]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #32797 (invalid C code in xmlrpc extension).
authorJoe Orton <jorton@php.net>
Fri, 22 Apr 2005 11:57:53 +0000 (11:57 +0000)
committerJoe Orton <jorton@php.net>
Fri, 22 Apr 2005 11:57:53 +0000 (11:57 +0000)
ext/xmlrpc/libxmlrpc/xml_element.c

index 8694b67fbc6a01b92cca325c56a26d17aad33b06..d60447a8d324963d370e2734d1b1240f76079b07 100644 (file)
@@ -44,6 +44,10 @@ static const char rcsid[] = "#(@) $Id$";
  *   06/2000
  * HISTORY
  *   $Log$
+ *   Revision 1.3.4.3  2004/06/01 20:16:18  iliaa
+ *   MFH: Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
+ *   200-210 range).
+ *
  *   Revision 1.3.4.2  2003/12/16 21:00:35  sniper
  *   MFH: fix compile warnings
  *
@@ -108,7 +112,7 @@ static const char rcsid[] = "#(@) $Id$";
 #include "expat.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
@@ -184,7 +188,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);
    }