summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2002-11-24 01:49:38 +0000
committerChad Loder <cloder@cvs.openbsd.org>2002-11-24 01:49:38 +0000
commit36f09f194a738db22255bdf4ce6e480602080001 (patch)
treef55436dd507d778140654c8167bc1269297a2510 /lib/libc
parentf5b09e27f92740ce6a8de8c181bd3e13b884bcba (diff)
Fix instance where syslog(3) after closelog(3) could access freed log
tag name. OK millert@, deraadt@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/syslog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index 8f8376e1c26..802d00677a6 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.19 2002/06/20 23:01:10 jjbg Exp $";
+static char rcsid[] = "$OpenBSD: syslog.c,v 1.20 2002/11/24 01:49:37 cloder Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -373,6 +373,7 @@ closelog_r(data)
(void)close(data->log_file);
data->log_file = -1;
data->connected = 0;
+ data->log_tag = NULL;
}
/* setlogmask -- set the log mask level */