]> granicus.if.org Git - libevent/commit
Simplify and correct evutil_open_closeonexec_
authorNick Mathewson <nickm@torproject.org>
Mon, 25 Jun 2012 16:19:26 +0000 (12:19 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 25 Jun 2012 16:19:26 +0000 (12:19 -0400)
commit0de587f47ede7e433d426e90b645f89669b8094b
tree06e6bc9313f3199e08bc106e790024d94741e8c4
parent1aaf9f013beef06680d8e6512eb6426ab70f6ba2
Simplify and correct evutil_open_closeonexec_

The original code needlessly called open in its two- or three-
argument format depending on the O_CREAT flag; this should not be
needed.

The code also leaked an fd if fcntl() failed.

Reported by Dave Hart.
evutil.c