summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd/control.c
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2014-04-25 11:12:15 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2014-04-25 11:12:15 +0000
commit371700a411cef35d8f28cbafbce0523fd350f3af (patch)
tree211668834f52cbb07445e0c2ee6bb12e67ad60e1 /usr.sbin/snmpd/control.c
parent102655be7533e94fe8745b8d900268ea71b7fe5c (diff)
Remove NULL pointer dereference, which jsg insists I not
call a use-after free, from error path. found by and ok jsg@
Diffstat (limited to 'usr.sbin/snmpd/control.c')
-rw-r--r--usr.sbin/snmpd/control.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/control.c b/usr.sbin/snmpd/control.c
index ed99aaba5fc..f0e409ca2a9 100644
--- a/usr.sbin/snmpd/control.c
+++ b/usr.sbin/snmpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.23 2014/04/21 19:47:27 reyk Exp $ */
+/* $OpenBSD: control.c,v 1.24 2014/04/25 11:12:14 blambert Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -471,8 +471,7 @@ control_dispatch_agentx(int fd, short event, void *arg)
uptime = smi_getticks();
if ((pdu = snmp_agentx_response_pdu(uptime, error, idx)) == NULL) {
- log_debug("bad response generation: %s",
- snmp_agentx_type2name(pdu->hdr->type));
+ log_debug("failed to generate response");
if (varcpy)
free(varcpy);
control_event_add(c, fd, EV_WRITE, NULL); /* XXX -- EV_WRITE? */