]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Reorder cleanup in qemuStateCleanup()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 18 Dec 2019 05:39:09 +0000 (06:39 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 18 Dec 2019 13:28:48 +0000 (14:28 +0100)
commit7cf76d4e3ab04e1ba6df9f113831b18d287d9e07
tree24d42da9b58af022c8f1579e49ba8ef7a8fcacf6
parent599f9c73d45369e2087be8ead53df8710d0f88dd
qemu: Reorder cleanup in qemuStateCleanup()

This function is supposed to clean up virQEMUDriver structure and
free individual members. However, it's doing that in random order
which makes it hard to track which members are being freed and
which are not. Do the free in reverse order than the structure
definition - assuming that the most important members (like
mutex) are declared first and freed last.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_driver.c