Subject: | Bad free() ignored |
The attached patches synchronizes XML::LibXSLT's and XML::LibXML's perl-libxml-mm.c; Bad Free() warnings as reported in http://aspn.activestate.com/ASPN/Mail/Message/perl-xml/2242154 will go away...
Index: perl-libxml-mm.c
===================================================================
RCS file: /home/cvs/XML-LibXSLT/perl-libxml-mm.c,v
retrieving revision 1.4
diff -u -b -r1.4 perl-libxml-mm.c
--- perl-libxml-mm.c 29 Feb 2004 17:50:52 -0000 1.4
+++ perl-libxml-mm.c 5 Aug 2005 13:59:51 -0000
@@ -130,7 +130,7 @@
ProxyNodePtr proxy;
if ( node->_private == NULL ) {
- proxy = (ProxyNodePtr)malloc(sizeof(ProxyNode));
+ Newc(0, proxy, 1, ProxyNode, ProxyNode);
/* proxy = (ProxyNodePtr)Newz(0, proxy, 0, ProxyNode); */
if (proxy != NULL) {
proxy->node = node;
@@ -238,7 +238,7 @@
xs_warn( "STANDALONE REAL DELETE" );
x_PmmFreeNode( libnode );
}
- free( node );
+ Safefree( node );
}
}
return retval;