>>>>> On Sat, 6 Mar 2010 15:18:32 -0500, "Szudy Brett-CBS035" 
>>>>> <brett.sz...@motorola.com> said:

SB> I have version 5.5 of netsnmp.   I am looking at snmp_agent.c, function
SB> init_master_agent and see a memory leak here.  strdup mallocs and
SB> duplicates the string into buf, but then buf is never released.  It is a
SB> local which is also never stored or returned, so it is lost forever and
SB> not able to be handled outside of this function.

You're right it's not.  Generally there are a number of places in the
code (many many actually) where single-instance calls to memory
allocation are taken and never cleaned up like they should be at
shut-down time because we assume that the nice memory-protected
operating system will do cleanup at application shutdown.  This is one
of the middle-casse where yes, a (small) string is duplicated and never
released but probably should be.

If you want to submit a patch to our patch tracker to fix it, we'd be
happy to consider it.  But it's probably not a serious problem for most people.
-- 
Wes Hardaker
Please mail all replies to net-snmp-coders@lists.sourceforge.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to