From: SourceForge.net <no...@so...> - 2010-12-01 00:08:25
|
Patches item #3053435, was opened at 2010-08-26 02:32 Message generated for change (Comment added) made by hardaker You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3053435&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Accepted Priority: 5 Private: No Submitted By: Take Vos (takevos) Assigned to: Wes Hardaker (hardaker) Summary: fix: tcpConnectionTable_data_access invalid memory access Initial Comment: On some Linux systems the tcpConnectionTable shows a random number in the process id and connection status columns. After running valgrind on net-snmp I found that the data structure (containing the process id and connection status columns) in the tcpConnectionTable was free-ed before it was used. The _add_connection() function stores a pointer to this structure in the tcpConnectionTable. But the caller of _add_connection() frees this structure after it has finished. The fix involves copying the netsnmp_tcpconn_entry struct in _add_connection, and add this copy as data into the tcpConnectionTable. The data is also free()ed by tcpConnectionTable itself, so this fix should not cause a memory leak. ---------------------------------------------------------------------- Comment By: Wes Hardaker (hardaker) Date: 2010-11-30 15:17 Message: Thanks for the patch! It has been applied to the 5.3.x and later code branches and the main development tree, and will appear in future releases of the Net-SNMP package. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3053435&group_id=12694 |