From 6e41de1ff024d9f5742361b03964798d9aad9a41 Mon Sep 17 00:00:00 2001 From: blambert Date: Fri, 25 Apr 2014 11:12:14 +0000 Subject: [PATCH] Remove NULL pointer dereference, which jsg insists I not call a use-after free, from error path. found by and ok jsg@ --- usr.sbin/snmpd/control.c | 5 ++--- 1 file 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 @@ -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? */ -- 2.20.1