2009/8/28 Gang Shu <[email protected]>:
> **************************discovered possible new bug(s)***********************
> (1.1) Filename: agent/mibgroup/notification-log-mib/notification_log.c,
> Function: initialize_table_nlmLogTable ()
>
> 354 /*
> 355 * create the table structure itself
> 356 */
> 357 nlmLogTable = netsnmp_create_table_data_set("nlmLogTable");
> 358
>
> Comments: Following the original bug-fix pattern, we believe that the
> variable “nlmLogTable” in line 357 should be freed at the end using the
> function “SNMP_FREE (nlmLogTable)”
Not correct.
The purpose of the 'initialize_table_xxx()' routine is to create and
register a data structure ('nlmLogTable') to hold the contents of
the table. This is then used by the agent framework and the
table_data_set helper to handle incoming requests for this table.
nlmLogTable should only be released when the agent finally shuts down.
> (1.2) Filename: agent/mibgroup/notification-log-mib/notification_log.c,
> Function: initialize_table_nlmLogVariableTable ()
>
> 191 /*
> 192 * create the table structure itself
> 193 */
> 194 table_set = netsnmp_create_table_data_set("nlmLogVariableTable");
> 195 nlmLogVarTable = table_set;
> 196 nlmLogVarTable->table->store_indexes = 1;
> 197
>
> Comments: We believe that the variable “table_set” in line 194 should be
> freed at the end using the function “SNMP_FREE (table_set)”
Again, the same thing hold true here.
The 'table_set' data structure will continue to be used until the
agent shuts down.
Neither of these structures should be freed until then.
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