SHA256
1
0
forked from pool/net-snmp
net-snmp/net-snmp-5.7.1-old-api-double-free.patch

23 lines
840 B
Diff

commit 5fd26e4fa3e000ea9c81c38ab975b7946efe2157
Author: Bart Van Assche <bvanassche@acm.org>
Date: Wed Sep 28 17:49:55 2011 +0200
CHANGES: agent: Avoid that netsnmp_register_old_api() failure triggers a double free.
Fixes a regression introduced via commit
aa4d47c2609e52818c9cdf1a8e2205de9a335a0a (svn r19515).
diff --git a/agent/helpers/old_api.c b/agent/helpers/old_api.c
index b1630e6..2d710b0 100644
--- a/agent/helpers/old_api.c
+++ b/agent/helpers/old_api.c
@@ -127,7 +127,7 @@ netsnmp_register_old_api(const char *moduleName,
*/
if (netsnmp_register_handler(reginfo) != MIB_REGISTERED_OK) {
/** netsnmp_handler_registration_free(reginfo); already freed */
- SNMP_FREE(vp);
+ /* SNMP_FREE(vp); already freed */
}
}
return SNMPERR_SUCCESS;