summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd/trap.c
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-05 06:42:19 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-05 06:42:19 +0000
commit716adb34dc0b0bdb029d5975f7a2527f150380b4 (patch)
tree074a966aceb08ca0f2763dd89f4e9b15e1256a8d /usr.sbin/snmpd/trap.c
parent0730fae5c0690606f7f653e4dcf64508150b23ea (diff)
strings.h -> string.h to prevent an implicit declaration warning. Also
remove a handful of NULL-checks before free().
Diffstat (limited to 'usr.sbin/snmpd/trap.c')
-rw-r--r--usr.sbin/snmpd/trap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/trap.c b/usr.sbin/snmpd/trap.c
index d8784bd1ff0..126bf27f5f5 100644
--- a/usr.sbin/snmpd/trap.c
+++ b/usr.sbin/snmpd/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.25 2015/11/21 13:09:47 reyk Exp $ */
+/* $OpenBSD: trap.c,v 1.26 2015/12/05 06:42:18 mmcc Exp $ */
/*
* Copyright (c) 2008 Reyk Floeter <reyk@openbsd.org>
@@ -138,8 +138,7 @@ trap_agentx(struct agentx_handle *h, struct agentx_pdu *pdu, int *idx,
done:
if (varbind != NULL)
ber_free_elements(varbind);
- if (v)
- free(v);
+ free(v);
*idx = x;
return (ret);
}