]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: replace call to virNetworkFree() with virObjectUnref()
authorLaine Stump <laine@laine.org>
Tue, 25 Nov 2014 09:17:51 +0000 (04:17 -0500)
committerLaine Stump <laine@laine.org>
Tue, 2 Dec 2014 08:32:44 +0000 (03:32 -0500)
commitc2d5bca167ac12b0ae277edadd64bf90d7f4ed3c
treea836198d54b937908f42c0b95915f1de34651ad4
parentb79d195b729179f96c835a03d47042bcce69ba9d
conf: replace call to virNetworkFree() with virObjectUnref()

The function virNetworkObjListExport() in network_conf.c had a call to
the public API virNetworkFree() which was causing a link error:

CCLD     libvirt_driver_vbox_network_impl.la
 ./.libs/libvirt_conf.a(libvirt_conf_la-network_conf.o): In function `virNetworkObjListExport':
/home/laine/devel/libvirt/src/conf/network_conf.c:4496: undefined reference to `virNetworkFree'

This would happen when I added

  #include "network_conf.h"

into domain_conf.h, then attempted to call a new function from that
file (and enum converter, similar to virNetworkForwardTypeToString())

In the end, virNetworkFree() ends up just calling virObjectUnref(obj)
anyway (after clearing all pending errors, which we probably *don't*
want to do in the cleanup of a utility function), so this is likely
more correct than the original code as well.
src/conf/network_conf.c