]> git.ipfire.org Git - thirdparty/tor.git/commit
When using open() to make sure we created a dir, close the fd afterwards
authorNick Mathewson <nickm@torproject.org>
Mon, 14 Mar 2016 17:02:50 +0000 (13:02 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 14 Mar 2016 17:03:44 +0000 (13:03 -0400)
commit36ad65a7d1709deeb4bc1ae3e994a30c3e7bf789
tree706f763d81ecccc742fb7694914416da8592ac0c
parenta64be7eaa9add3ac147447faae77906bbafd1b0a
When using open() to make sure we created a dir, close the fd afterwards

Found by coverity. Not in any released Tor. Fixes CID 1355640.

Also, don't check for fd correctness with assert(fd).  You need to
assert (fd >= 0).
src/common/util.c