Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6496c4bf authored by Josh Gao's avatar Josh Gao
Browse files

base: disallow close() on unique_fd.

unique_fd's implicit conversion to int allows it to be passed to
close(2), which is dangerous because unique_fd will think that it still
has ownership of the now-closed fd. Disallow this by providing an
overload for close that's tagged with an attribute that gives a
compile-time error.

Test: m
Change-Id: I514591335b337f2f57c1df371cf3979304aea17c
parent e461b379
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment