diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-08-31 05:20:37 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-08-31 05:20:37 +0000 |
commit | 08b0d1ab4ef69f2cedece897ebe84e109114dee6 (patch) | |
tree | 16497923fd41085e116455114a48ef84be99f0e7 /usr.sbin/snmpd | |
parent | 45abb4f8b0a09f3adcc56f170c361c9ef00aad5a (diff) |
fix fd leak in an error path
ok mpi@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r-- | usr.sbin/snmpd/mib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index 8cc556b0319..104b8a6b0f4 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.90 2018/08/30 12:25:40 jsg Exp $ */ +/* $OpenBSD: mib.c,v 1.91 2018/08/31 05:20:36 jsg Exp $ */ /* * Copyright (c) 2012 Joel Knight <joel@openbsd.org> @@ -2937,7 +2937,7 @@ mib_carpgroupget(u_int idx) if ((ifgr.ifgr_groups = calloc(1, len)) == NULL) { log_warn("alloc"); - return (NULL); + goto err; } if (ioctl(s, SIOCGIFGLIST, (caddr_t)&ifgr) == -1) { log_warn("SIOCGIFGLIST"); |