squid 3.5.28: latest patches (01-02)
[people/pmueller/ipfire-2.x.git] / src / patches / squid / 02_Fix_memory_leak_when_parsing_SNMP_packet_313.patch
CommitLineData
e2bd68df
MF
1commit bc9786119f058a76ddf0625424bc33d36460b9a2 (refs/remotes/origin/v3.5)
2Author: flozilla <fishyflow@gmail.com>
3Date: 2018-10-24 14:12:01 +0200
4
5 Fix memory leak when parsing SNMP packet (#313)
6
7 SNMP queries denied by snmp_access rules and queries with certain
8 unsupported SNMPv2 commands were leaking a few hundred bytes each. Such
9 queries trigger "SNMP agent query DENIED from..." WARNINGs in cache.log.
10
11diff --git a/src/snmp_core.cc b/src/snmp_core.cc
12index c4d21c1..16c2993 100644
13--- a/src/snmp_core.cc
14+++ b/src/snmp_core.cc
15@@ -409,6 +409,7 @@ snmpDecodePacket(SnmpRequest * rq)
16 snmpConstructReponse(rq);
17 } else {
18 debugs(49, DBG_IMPORTANT, "WARNING: SNMP agent query DENIED from : " << rq->from);
19+ snmp_free_pdu(PDU);
20 }
21 xfree(Community);
22