Module Name: src Committed By: pooka Date: Sun Mar 10 17:55:42 UTC 2013
Modified Files: src/sys/kern: kern_uidinfo.c Log Message: At least pretend to not leak memory in sysctl initialization. This commit message would be longer if it included opinions about sysctllog vs. CTLFLAG_PERMANENT ... To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/kern/kern_uidinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/kern_uidinfo.c diff -u src/sys/kern/kern_uidinfo.c:1.7 src/sys/kern/kern_uidinfo.c:1.8 --- src/sys/kern/kern_uidinfo.c:1.7 Sat Jun 9 02:55:32 2012 +++ src/sys/kern/kern_uidinfo.c Sun Mar 10 17:55:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_uidinfo.c,v 1.7 2012/06/09 02:55:32 christos Exp $ */ +/* $NetBSD: kern_uidinfo.c,v 1.8 2013/03/10 17:55:42 pooka Exp $ */ /*- * Copyright (c) 1982, 1986, 1991, 1993 @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_uidinfo.c,v 1.7 2012/06/09 02:55:32 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_uidinfo.c,v 1.8 2013/03/10 17:55:42 pooka Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -85,13 +85,13 @@ sysctl_kern_uidinfo_cnt(SYSCTLFN_ARGS) return EINVAL; } +static struct sysctllog *kern_uidinfo_sysctllog; + static void sysctl_kern_uidinfo_setup(void) { const struct sysctlnode *rnode, *cnode; - struct sysctllog *kern_uidinfo_sysctllog; - kern_uidinfo_sysctllog = NULL; sysctl_createv(&kern_uidinfo_sysctllog, 0, NULL, &rnode, CTLFLAG_PERMANENT, CTLTYPE_NODE, "uidinfo",