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 ...
This commit is contained in:
parent
459d6cf13a
commit
55246528e8
@ -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
|
* Copyright (c) 1982, 1986, 1991, 1993
|
||||||
@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#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/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -85,13 +85,13 @@ sysctl_kern_uidinfo_cnt(SYSCTLFN_ARGS)
|
|||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct sysctllog *kern_uidinfo_sysctllog;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sysctl_kern_uidinfo_setup(void)
|
sysctl_kern_uidinfo_setup(void)
|
||||||
{
|
{
|
||||||
const struct sysctlnode *rnode, *cnode;
|
const struct sysctlnode *rnode, *cnode;
|
||||||
struct sysctllog *kern_uidinfo_sysctllog;
|
|
||||||
|
|
||||||
kern_uidinfo_sysctllog = NULL;
|
|
||||||
sysctl_createv(&kern_uidinfo_sysctllog, 0, NULL, &rnode,
|
sysctl_createv(&kern_uidinfo_sysctllog, 0, NULL, &rnode,
|
||||||
CTLFLAG_PERMANENT,
|
CTLFLAG_PERMANENT,
|
||||||
CTLTYPE_NODE, "uidinfo",
|
CTLTYPE_NODE, "uidinfo",
|
||||||
|
Loading…
Reference in New Issue
Block a user