From: Eric Blake Date: Mon, 10 Jan 2011 22:35:37 +0000 (-0700) Subject: network: plug memory leak X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6e2bab80c8899cee33d2958ee50e6f6fa304591f;p=libvirt.git network: plug memory leak * src/conf/network_conf.c (virNetworkDefParseXML): Release ipNodes. --- diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index abe91b59c5..28a3ee8325 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -1,7 +1,7 @@ /* * 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 * * This library is free software; you can redistribute it and/or @@ -646,6 +646,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt) def->nips++; } } + VIR_FREE(ipNodes); /* IPv4 forwarding setup */ if (virXPathBoolean("count(./forward) > 0", ctxt)) { @@ -677,6 +678,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt) error: virNetworkDefFree(def); + VIR_FREE(ipNodes); return NULL; }