1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

network: plug memory leak

* src/conf/network_conf.c (virNetworkDefParseXML): Release ipNodes.
This commit is contained in:
Eric Blake 2011-01-10 15:35:37 -07:00
parent 243b7814c7
commit 6e2bab80c8

View File

@ -1,7 +1,7 @@
/* /*
* network_conf.c: network XML handling * network_conf.c: network XML handling
* *
* Copyright (C) 2006-2010 Red Hat, Inc. * Copyright (C) 2006-2011 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange * Copyright (C) 2006-2008 Daniel P. Berrange
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
@ -646,6 +646,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
def->nips++; def->nips++;
} }
} }
VIR_FREE(ipNodes);
/* IPv4 forwarding setup */ /* IPv4 forwarding setup */
if (virXPathBoolean("count(./forward) > 0", ctxt)) { if (virXPathBoolean("count(./forward) > 0", ctxt)) {
@ -677,6 +678,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt)
error: error:
virNetworkDefFree(def); virNetworkDefFree(def);
VIR_FREE(ipNodes);
return NULL; return NULL;
} }