diff options
author | Andreas Schneider <asn@samba.org> | 2013-02-20 10:48:05 +0100 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2013-02-22 16:36:14 +0100 |
commit | 3ca727b2f98ca942040d5a6c54fe61bb268d75d9 (patch) | |
tree | cc4dbdbc7fe7994822adc10c47a6e9bd1acc2a01 /lib/util | |
parent | c647169e2850cf6f8ea8705d7008e3ce4d24f454 (diff) | |
download | samba-3ca727b2f98ca942040d5a6c54fe61bb268d75d9.tar.gz samba-3ca727b2f98ca942040d5a6c54fe61bb268d75d9.tar.bz2 samba-3ca727b2f98ca942040d5a6c54fe61bb268d75d9.zip |
lib-util: Don't leak file descriptor on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'lib/util')
-rw-r--r-- | lib/util/become_daemon.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c index 373927ca6e..2ca047861f 100644 --- a/lib/util/become_daemon.c +++ b/lib/util/become_daemon.c @@ -62,6 +62,7 @@ _PUBLIC_ void close_low_fds(bool stdin_too, bool stdout_too, bool stderr_too) } if (fd != i) { DEBUG(0,("Didn't get file descriptor %d\n",i)); + close(fd); return; } } |