[PATCH 1/1] qemuProcessEventSubmit : fix potential use after free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Coverity scan reports use after free issue.
In error case, don't free vm object as it will be unlocked+freed
in the parent function like qemuProcessHandleReset().

Signed-off-by: Shaleen Bathla <shaleen.bathla@xxxxxxxxxx>
---
 src/qemu/qemu_process.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 9fc7eada5220..a4133b37cf22 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -287,7 +287,6 @@ qemuProcessEventSubmit(virDomainObj *vm,
     event->data = data;
 
     if (virThreadPoolSendJob(driver->workerPool, 0, event) < 0) {
-        virObjectUnref(vm);
         qemuProcessEventFree(event);
     }
 }
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux