[PATCH 05/10] qemuDomainGetSEVMeasurement: fix possible leak

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

 



Free tmp even on failure.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f0fb806fcd..ac2ef35f70 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -21532,10 +21532,10 @@ qemuDomainGetSEVMeasurement(virQEMUDriverPtr driver,
                                 tmp) < 0)
         goto endjob;
 
-    VIR_FREE(tmp);
     ret = 0;
 
  endjob:
+    VIR_FREE(tmp);
     qemuDomainObjEndJob(driver, vm);
     return ret;
 }
-- 
2.16.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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