Re: Index Issue: container not get freed before another cache_load

Sharad Chandra <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization NIKSUN
Message-ID <[email protected]>
On Wednesday 10 October 2007 8:26 pm, Rasanth Akali Kandoth wrote:
> Hi Chandra,
> can you pls post the diff of your fix, if it is in the public code.
oops i missed the mail.

On net-snmp-5.2.3_3
code is generated by mib2c -c mib2c.mfd.conf storageStatusTable.

Attached: diff

Sharad Chandra

> in fact there is leak in inetCidrRouteTable , ipAddressTable etc... i tried
> to fix in netsnmp_binary_array_release function by freeying array t->data
> in a loop t->count number of times. not sure this is correct...but after
> that ifTable is crashing when it tries to load the data.
>
> Thanks&Regards,
> Rasanth
>
> On 10/10/07, Sharad Chandra <[email protected]> wrote:
> > Hi,
> >
> >         In cache_free i used, CONTAINER_FREE (container); call. but that
> > gives me
> > segmentation fault.
> > Latter i thought, where index is being register, if that is freed may
> > work.
> > Therefor before going to loop and calling se_find_value_in_slist and
> > se_add_pair_to_slist for index. i used se_clear_all_lists(); and it works
> > for
> > me.
> >

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
diff (text/x-diff, 356 B)
--- storageStatusTable_data_access.c.orig	Fri Nov  2 10:43:46 2007
+++ storageStatusTable_data_access.c	Fri Nov  2 10:45:13 2007
@@ -212,6 +212,7 @@
      * set the index(es) [and data, optionally] and insert into
      * the container.
      */
+    se_clear_all_lists();
     while( 1 ) {
     /*
     ***************************************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.