On Mon, Aug 31, 2009 at 03:59:17PM -0400, Gang Shu wrote:
> Hi Dave,
> Thanks a lot for your kind reply. However, I am still confused about the
> function 'shutdown_notification_log()', since there is no explicitly
> resource release statement in it.
> Could you please give me more details? Thanks!
There is an explicit resource release statement:
exit(0);
I believe the idea is that when it's known that the program is about
to exit soon anyway, there's no concerted effort to release all the
memory because the OS will clean it up soon anyway.
Steve
>
> void shutdown_notification_log(void)
> {
> max_logged = 0;
> check_log_size(0, NULL);
> }
>
> Best,
> Gang
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On
> Behalf Of Dave Shield
> Sent: Monday, August 31, 2009 2:13 PM
> To: Gang Shu
> Cc: [email protected]
> Subject: Re: Bugs discovered by a research group at CWRU
>
> 2009/8/31 Gang Shu <[email protected]>:
> > Could you please tell us where the global variables "nlmLogTable"
> > and "table_set" have been freed?
>
> This data structure will be freed when the agent shuts down.
>
> I strongly suspect it's not explicitly released - most of the MIB module
> handlers don't bother to clean up fully, since they will typically only
> be unloaded as part of the agent shutting down (when it will release
> all allocated memory anyway).
>
> The natural place to handle this resource release would probably be
> in the 'shutdown_notification_log()' routine.
>
> Dave
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Net-snmp-coders mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--
Stephen J Friedl | Security Consultant | UNIX Wizard | 714 694-0494
[email protected] | Orange County, CA | Microsoft MVP | unixwiz.net
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders