Re: Fw: Unable to build Net-Snmp with embedded perl

Bart Van Assche <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAO+b5-o8KCdtm73S4g_hgKVNq6F2xemarvO55hwXDX5S5d29Pg@mail.gmail.com>
On Mon, Aug 1, 2011 at 6:05 PM, <[email protected]> wrote:

> Free to wrong pool 2377e8 not fdfdfdfd at ..\blib\lib/NetSNMP/OID.pm line
> 31.
>

The patch below should fix the above issue:

diff --git a/include/net-snmp/library/tools.h
b/include/net-snmp/library/tools.h
index 39e661c..24a18b0 100644
--- a/include/net-snmp/library/tools.h
+++ b/include/net-snmp/library/tools.h
@@ -54,7 +54,7 @@ extern          "C" {

 /** @def SNMP_FREE(s)
     Frees a pointer only if it is !NULL and sets its value to NULL */
-#define SNMP_FREE(s)    do { if (s) { free((void *)s); s=NULL; } } while(0)
+#define SNMP_FREE(s)    do { if (s) { netsnmp_free(s); (s) = NULL; } }
while(0)

 /** @def SNMP_SWIPE_MEM(n, s)
     Frees pointer n only if it is !NULL, sets n to s and sets s to NULL */

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1

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