From b16598fcec4662c5c8ade2339946556313ab4451 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 25 Jan 2016 08:24:31 +0000 Subject: avoid a potential double free ok blambert@ --- usr.sbin/snmpd/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin/snmpd/control.c') diff --git a/usr.sbin/snmpd/control.c b/usr.sbin/snmpd/control.c index af9f44e56a2..6fe77497ec8 100644 --- a/usr.sbin/snmpd/control.c +++ b/usr.sbin/snmpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.37 2015/12/05 13:14:40 claudio Exp $ */ +/* $OpenBSD: control.c,v 1.38 2016/01/25 08:24:30 jsg Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -635,6 +635,7 @@ control_dispatch_agentx(int fd, short event, void *arg) if (varcpy) { snmp_agentx_raw(pdu, varcpy, vcpylen); /* XXX */ free(varcpy); + varcpy = NULL; } snmp_agentx_send(h, pdu); -- cgit v1.2.3