virNWFilterDefParseXML: avoid leak on error paths

* src/conf/nwfilter_conf.c (virNWFilterDefParseXML): Also free "ret"
via cleanup.
This commit is contained in:
Jim Meyering 2010-05-18 12:05:53 +02:00
parent 43beb82eca
commit bc5443f4c6

View File

@ -1767,6 +1767,7 @@ virNWFilterDefParseXML(xmlXPathContextPtr ctxt) {
return ret; return ret;
cleanup: cleanup:
virNWFilterDefFree(ret);
VIR_FREE(chain); VIR_FREE(chain);
VIR_FREE(uuid); VIR_FREE(uuid);
return NULL; return NULL;