summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/syslog.c6
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