]> xenbits.xensource.com Git - libvirt.git/commitdiff
network_conf.c: Free xmlDoc after use
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 8 Feb 2013 14:25:03 +0000 (15:25 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 8 Feb 2013 15:01:58 +0000 (16:01 +0100)
The virNetworkObjUpdateParseFile() function was not freeing the xml
variable, leaving us with a memory leak.

src/conf/network_conf.c

index c93916dd1d230561e9d97dfaa56d74ebac87c85e..3604ff7d592e4c639f14595f8fd78e0e75ba5b8f 100644 (file)
@@ -1895,6 +1895,7 @@ virNetworkObjUpdateParseFile(const char *filename,
     ret = 0;
 
 cleanup:
+    xmlFreeDoc(xml);
     xmlXPathFreeContext(ctxt);
     return ret;
 }