summaryrefslogtreecommitdiffstats
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2018-08-31 05:20:36 +0000
committerjsg <jsg@openbsd.org>2018-08-31 05:20:36 +0000
commit8baf5678442fe520578cf36d124a72a6818a54a4 (patch)
tree688922863ac857e08a1d18965cf23f579da9a157 /usr.sbin/snmpd
parentMove kcov device definitions into <sys/conf.h>. (diff)
downloadwireguard-openbsd-8baf5678442fe520578cf36d124a72a6818a54a4.tar.xz
wireguard-openbsd-8baf5678442fe520578cf36d124a72a6818a54a4.zip
fix fd leak in an error path
ok mpi@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/mib.c4
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");