]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: reorganize virNetworkDHCPDefParseXML
authorLaine Stump <laine@laine.org>
Thu, 21 May 2015 19:51:02 +0000 (15:51 -0400)
committerLaine Stump <laine@laine.org>
Thu, 23 Jul 2015 20:38:08 +0000 (16:38 -0400)
commit03b6bdcab333ef2298c90cd982490c15b6aaa10f
treef67ac8307f947993c23d7cc0de623c06c8bb0748
parentf86c45ca0c10c84c954ed201531ab31129d9c9c3
conf: reorganize virNetworkDHCPDefParseXML

This makes the range and static host array management in
virNetworkDHCPDefParseXML() more similar to what is done in
virNetworkDefUpdateIPDHCPRange() and virNetworkDefUpdateIPDHCPHost() -
they use VIR_APPEND_ELEMENT rather than a combination of
VIR_REALLOC_N() and separate incrementing of the array size.

The one functional change here is that a memory leak of the contents
of the last (unsuccessful) virNetworkDHCPHostDef was previously leaked
in certain failure conditions, but it is now properly cleaned up.
src/conf/network_conf.c