If the netsnmp_register_mib() function returns error, sometimes it frees
its reginfo argument (agent_registry.c:1136) and sometimes not
(agent_registry.c:1164). The caller does not know what to do and in most
cases frees reginfo again (e.g. hrSWInstalledTable.c:144 and :166).

I'd guess that netsnmp_register_mib() should not free its arguments, but
I want to know your opinion first - I don't dare to touch these parts of
agent without a review.

BTW, there are *lot of* cases when return value of
netsnmp_register_mib() is not checked at all, e.g.
mibgroup/agent/extend.c:198 and serious rewrite is needed.

Jan

------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to