git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c647169
)
lib-util: Don't leak file descriptor on error.
author
Andreas Schneider
<asn@samba.org>
Wed, 20 Feb 2013 09:48:05 +0000
(10:48 +0100)
committer
Alexander Bokovoy
<ab@samba.org>
Fri, 22 Feb 2013 15:36:14 +0000
(16:36 +0100)
Reviewed-by: Alexander Bokovoy <ab@samba.org>
lib/util/become_daemon.c
patch
|
blob
|
history
diff --git
a/lib/util/become_daemon.c
b/lib/util/become_daemon.c
index 373927ca6ea95def39716e5aae4189e54897e7b9..2ca047861f18321c4e173d901ace0e56dcb943fb 100644
(file)
--- 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;
}
}