]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nwfilter: Fix potential locking problems on ObjLoad failure
authorCole Robinson <crobinso@redhat.com>
Sun, 24 Apr 2016 22:49:02 +0000 (18:49 -0400)
committerCole Robinson <crobinso@redhat.com>
Mon, 2 May 2016 14:06:04 +0000 (10:06 -0400)
commitab05abdbc395a77bd21ea475f42e78e2c479ea60
tree6cc218b28184782266c74a2478d190b01d7eb33c
parent26af7e4e932d72e7ead88e2e687b3ee0ca4718bb
nwfilter: Fix potential locking problems on ObjLoad failure

In virNWFilterObjLoad we can still fail after virNWFilterObjAssignDef,
but we don't unlock and free the created virNWFilterObjPtr in the
cleanup path.

The bit we are trying to do after AssignDef is just STRDUP in the
configFile path. However caching the configFile in the NWFilterObj
is largely redundant and doesn't follow the same pattern we use
for domain and network objects.

So just remove all the configFile caching which fixes the latent
bug as a side effect.
src/conf/nwfilter_conf.c
src/conf/nwfilter_conf.h
src/nwfilter/nwfilter_driver.c