From: hno <> Date: Wed, 16 May 2001 13:47:00 +0000 (+0000) Subject: Documented a memory leak on SNMP initialization. Quite a large reorganisation X-Git-Tag: SQUID_3_0_PRE1~1511 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c501ffd4c95bfee6786c73d6d12d61084ff2180;p=thirdparty%2Fsquid.git Documented a memory leak on SNMP initialization. Quite a large reorganisation is requred to fix it, and it is only a small fixed amount so this have to wait until later.. --- diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 654f356689..48d2fcafc4 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.cc,v 1.47 2001/02/23 20:59:51 hno Exp $ + * $Id: snmp_core.cc,v 1.48 2001/05/16 07:47:00 hno Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -97,6 +97,9 @@ snmpInit(void) snmplib_debug_hook = snmpSnmplibDebug; + /* XXX: This leaks memory due to snmpAddNode duplicating the passed + * oid node, and we are not freeing the one returned by snmpCreateOid + */ mib_tree_head = snmpAddNode(snmpCreateOid(1, 1), 1, NULL, NULL, 1, snmpAddNode(snmpCreateOid(2, 1, 3),