]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuProcessReconnect: clear 'oldjob'
authorJán Tomko <jtomko@redhat.com>
Mon, 14 Sep 2020 11:29:23 +0000 (13:29 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 14 Sep 2020 16:10:56 +0000 (18:10 +0200)
commitaf16e754cd4efc3ca1df2b2e725945be743e87f9
tree531164265935ea786318a83038213e5ab34b755c
parenta3c340e05f59738b0873c914caa531986b8e81b2
qemuProcessReconnect: clear 'oldjob'

After we started copying the privateData pointer in
qemuDomainObjRestoreJob, we should also free them
once we're done with them.

Register the clear function and use g_auto.
Also add a check for job->cb to qemuDomainObjClearJob,
to prevent freeing an uninitialized job.

https://bugzilla.redhat.com/show_bug.cgi?id=1878450

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: aca37c3fb2e8d733c2788ca4b796c153ea7ce391
src/qemu/qemu_domainjob.c
src/qemu/qemu_domainjob.h
src/qemu/qemu_process.c