From: Pablo Neira Ayuso Date: Tue, 26 Mar 2013 21:48:58 +0000 (+0100) Subject: ulogd: close logfile description in the exit path of parent process X-Git-Tag: ulogd-2.0.3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3179bd4de89de7c2388849f5bc48e8f5aad9e5b9;p=thirdparty%2Fulogd2.git 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 Signed-off-by: Pablo Neira Ayuso --- 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(); }