diff options
author | Joe Orton <jorton@php.net> | 2005-04-22 11:06:53 +0000 |
---|---|---|
committer | Joe Orton <jorton@php.net> | 2005-04-22 11:06:53 +0000 |
commit | 7c5f5697cea2b82461b2291c3cf6c6bafe1deea4 (patch) | |
tree | bb499fa06c2b29b48c422d6809f1daab037b2cd2 | |
parent | 755b027e8c34fc85bd4a4fd393cf206152e28911 (diff) | |
download | php-git-7c5f5697cea2b82461b2291c3cf6c6bafe1deea4.tar.gz |
Fixed bug #32797 (invalid C code in xmlrpc extension).
-rw-r--r-- | ext/xmlrpc/libxmlrpc/xml_element.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/xmlrpc/libxmlrpc/xml_element.c b/ext/xmlrpc/libxmlrpc/xml_element.c index 68eb0b60e3..1016574e7a 100644 --- a/ext/xmlrpc/libxmlrpc/xml_element.c +++ b/ext/xmlrpc/libxmlrpc/xml_element.c @@ -44,6 +44,9 @@ static const char rcsid[] = "#(@) $Id$"; * 06/2000 * HISTORY * $Log$ + * Revision 1.8 2005/03/28 00:07:24 edink + * Reshufle includes to make it compile on windows + * * Revision 1.7 2005/03/26 03:13:58 sniper * - Made it possible to build ext/xmlrpc with libxml2 * @@ -116,7 +119,7 @@ static const char rcsid[] = "#(@) $Id$"; #include "queue.h" #include "encodings.h" -#define my_free(thing) if(thing) {free(thing); thing = 0;} +#define my_free(thing) if(thing) {free(thing); thing = NULL;} #define XML_DECL_START "<?xml" #define XML_DECL_START_LEN sizeof(XML_DECL_START) - 1 @@ -192,7 +195,10 @@ void xml_elem_free_non_recurse(xml_element* root) { Q_Destroy(&root->children); Q_Destroy(&root->attrs); - my_free((char*)root->name); + if(root->name) { + free((char *)root->name); + root->name = NULL; + } simplestring_free(&root->text); my_free(root); } |