]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc: Fix lxcDomainDestroyFlags endjob processing
authorJohn Ferlan <jferlan@redhat.com>
Fri, 20 May 2016 12:42:29 +0000 (08:42 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 25 May 2016 10:02:42 +0000 (06:02 -0400)
commitcb0159df9f1d0f5eaa489efa0c2b307441c23ba8
tree0502e15247ad4f209ca1a2ae14d31fb1efd3cb26
parentfb06350021d755c8a443cbb7b13a4c9a64f9fd5f
lxc: Fix lxcDomainDestroyFlags endjob processing

Commit id '15ccb0dbf' added job functions for the lxc driver; however,
for shutdown and nonpersistent path, the vm was removed from the domain
object list and the vm pointer cleared before the endjob.

Adjust the code to perform the endjob first and then perform the
ObjListRemove as long as the vm wasn't NULL. This follows more closely
models from qemu and libxl

Found by Coverity (FORWARD_NULL)
src/lxc/lxc_driver.c