On Fri, 19 May 2006 14:14:50 -0400 Robert wrote:
RS> On Thu, 4 May 2006 17:29:03 +0100 (BST) [EMAIL PROTECTED] wrote:
RS> DCU> Hi All,
RS> DCU> I've been investigating a memory leak using net-snmp 5.2.1.2 and I
RS> DCU> think I've tracked the problem down to the send_trap_to_sess()
RS> DCU> routine in agent_trap.c
RS> DCU>
RS> DCU> If snmp_send() fails, then snmp_sess_perror() is called but the pdu
RS> DCU> is not freed, the call to snmp_free_pdu() is commented out. However,
RS> DCU> in snmp_api.c the comments for snmp_send() state that the caller must
RS> DCU> call snmp_free_pdu() if 0 is returned.
RS> DCU>
RS> DCU> I cannot see any bug reports or patches for this problem.
RS> DCU>
RS> DCU> Why would the snmp_free_pdu() be commented out?
RS>
RS> I don't know, but it's been that way since Nov 2003.
I think I figured it out. When the code was commented out, a call to
snmp_synch_response() was also added. This function calls snmp_send
internally, and will free the pdu on error. So the commented out code would
have resulted in a double free.
Since then, the snmp_synch_response() call was replaced with
snmp_async_send(), so the free should be uncommented. Will fix for 5.3.1 and
5.2.3.
--
NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders