From: flozilla Date: Wed, 24 Oct 2018 12:12:01 +0000 (+0200) Subject: Fix memory leak when parsing SNMP packet (#313) X-Git-Tag: M-staged-PR314~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=644131ff1e00c1895d77561f561d29c104ba6b11;p=thirdparty%2Fsquid.git Fix memory leak when parsing SNMP packet (#313) SNMP queries denied by snmp_access rules and queries with certain unsupported SNMPv2 commands were leaking a few hundred bytes each. Such queries trigger "SNMP agent query DENIED from..." WARNINGs in cache.log. --- diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 29aa0c28d3..9141081e98 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -409,6 +409,7 @@ snmpDecodePacket(SnmpRequest * rq) snmpConstructReponse(rq); } else { debugs(49, DBG_IMPORTANT, "WARNING: SNMP agent query DENIED from : " << rq->from); + snmp_free_pdu(PDU); } xfree(Community);