Trying to addres memory leak in xxx_allocate_rowreq_ctx()

Malathi Panyam <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,
     We heavily use the code generated by MIB2C for all the MIB tables supported. When a memory leak report was generated, most of them point to the function  xxx_allocate_rowreq_ctx() called in xxx_container_load().

More precisely at xxx_allocate_rowreq_ctx() in the xxx_interface.c
xxx_rowreq_ctx *rowreq_ctx =
                  SNMP_MALLOC_TYPEDEF(xxx_rowreq_ctx);

    =>   if(NULL == rowreq_ctx) {  //MEMORY LEAK Report was pointing this line.
        snmp_log(LOG_ERR,"Couldn't allocate memory for a "
                 "xxx_rowreq_ctx.\n");
        return NULL;
            }

I don't see anything wrong here, but the memory leak report complains a lot about this line.

We are using the NetSNMP version 5.4.2.1.

Is this a known issue? Pl help.

Thanks and Regards,
Malathi

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1

_______________________________________________
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
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.