summaryrefslogtreecommitdiff
blob: 15e5950d820f8cb9ec6778a40f70eb74ea642791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- ext/xmlrpc/libxmlrpc/xml_element.c	2004-06-01 22:16:06.000000000 +0200
+++ ext/xmlrpc/libxmlrpc/xml_element.c	2005-04-22 13:54:17.000000000 +0200
@@ -113,7 +116,7 @@
 #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
@@ -189,7 +192,10 @@
 
       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);
    }