Hello.

        I need to implement dynamic handlers registration/unregistration in my 
agent.
I do it like that:
Registration:
netsnmp_handler_registration *dyn_handler_reginfo;
dyn_handler_reginfo = netsnmp_create_handler_registration(...);
netsnmp_register_scalar(dyn_handler_reginfo);

Unregistration:
netsnmp_unregister_handler(dyn_handler_reginfo);

And it all works fine, but I'm concerned about memory leaks. At first, I 
thought that I'm supposed to call netsnmp_handler_registration_free 
after netsnmp_unregister_handler - but agent crashes in that case.

I looked in netsnmp_unregister_handler sources, but I can't surely say 
if it frees all resources allocated by netsnmp_create_handler_registration.

The question is : Is there a need for netsnmp_handler_registration_free 
or just netsnmp_unregister_handler is enough?

Thanks in advance,
Kirill.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to