]> git.ipfire.org Git - thirdparty/squid.git/commit
SNMP: Match Var allocation/deallocation methods (#2183)
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Sat, 20 Sep 2025 16:48:47 +0000 (16:48 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 20 Sep 2025 16:50:23 +0000 (16:50 +0000)
commit4022971135dd49add83e867b6e4c0aaae4fe9aca
treeae3c8b8b3e36570c6d8a2e7083d759ec61c265b3
parent20681dbd20c4e0e7950626f277832daeb7fb71da
SNMP: Match Var allocation/deallocation methods (#2183)

Pdu::setVars() and Pdu::unpack() allocate variables with `new Var(...)`,
but clearVars() freed them using snmp_var_free(). That skipped the `Var`
destructor and mismatched the allocator.

We hope that all Pdu::variables are allocated via Pdu class methods
despite the presence of snmp_var_new() and snmp_var_clone() calls in
low-level snmplib code.
src/snmp/Pdu.cc