diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-01-25 08:24:31 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-01-25 08:24:31 +0000 |
commit | b16598fcec4662c5c8ade2339946556313ab4451 (patch) | |
tree | d3d5a39b59cd6bd828805880e1ec194863dd5c41 | |
parent | 328593763e1dfebc3067e4da0622dc04f0d3deb9 (diff) |
avoid a potential double free
ok blambert@
-rw-r--r-- | usr.sbin/snmpd/control.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <reyk@openbsd.org> @@ -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); |