diff options
author | 2002-06-20 23:01:10 +0000 | |
---|---|---|
committer | 2002-06-20 23:01:10 +0000 | |
commit | bb7d6483e6984e058e4a6ac304b2b5c8c427eef3 (patch) | |
tree | a0fd4c31db5e4c862af662da9f8af1621690e422 /lib/libc/gen/syslog.c | |
parent | bunch more reg defns (pkh/pke mostly). (diff) | |
download | wireguard-openbsd-bb7d6483e6984e058e4a6ac304b2b5c8c427eef3.tar.xz wireguard-openbsd-bb7d6483e6984e058e4a6ac304b2b5c8c427eef3.zip |
Close log file when leaving syslog_r(). deraadt@ ok
Diffstat (limited to 'lib/libc/gen/syslog.c')
-rw-r--r-- | lib/libc/gen/syslog.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index da64fc913c2..8f8376e1c26 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: syslog.c,v 1.18 2002/06/05 17:13:49 millert Exp $"; +static char rcsid[] = "$OpenBSD: syslog.c,v 1.19 2002/06/20 23:01:10 jjbg Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -300,6 +300,10 @@ vsyslog_r(pri, data, fmt, ap) (void)writev(fd, iov, 2); (void)close(fd); } + + if (data != &sdata) { + closelog_r(data); + } } static void |