leak of socket in netsnmp_unix_transport() function
leeriorio opened this issue · comments
Hello! In result of static analyse of net-snmp sources with Svace static analyzer I found minor error of cathegory "HANDLE_LEAK", which means that there is potential error with memory usage. There is creation of socket:
net-snmp/snmplib/transports/snmpUnixDomain.c
Line 353 in b3163b3
then, if we run unstructions in lines 363-364 below
net-snmp/snmplib/transports/snmpUnixDomain.c
Lines 364 to 366 in b3163b3
netsnmp_transport_free()
won't clear memory in t->sock
, isn't it?
net-snmp/snmplib/snmp_transport.c
Lines 230 to 248 in b3163b3
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author E.Zilotina.