diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-26 22:48:58 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-03-26 22:54:48 +0100 |
commit | 3179bd4de89de7c2388849f5bc48e8f5aad9e5b9 (patch) | |
tree | 7834cfef322f0e6d716863331903185ac8198f49 | |
parent | 47b7c60572163a508cf67e90aca6b61e089a5657 (diff) |
ulogd: close logfile description in the exit path of parent process
Joan Touzet reported that file descriptor 3 was not ever closed
in the exit path of the parent process:
open("ulogd.conf", O_RDONLY) = 3
That corresponds to the the file descriptor that was used to
parse the configuration file was not closed.
This closes: http://bugzilla.netfilter.org/show_bug.cgi?id=793
Reported-by: Joan Touzet <joant@cloudant.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | src/ulogd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ulogd.c b/src/ulogd.c index b28d0f8..ded9218 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -1277,6 +1277,7 @@ int main(int argc, char* argv[]) fclose(stdout); fclose(stderr); fclose(stdin); + fclose(logfile); setsid(); } |