提交 6e2bab80 编写于 作者: E Eric Blake

network: plug memory leak

* src/conf/network_conf.c (virNetworkDefParseXML): Release ipNodes.
上级 243b7814
/*
* 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册