[libvirt] [PATCH 1/2] qemu: caps: Fix segfault on daemon startup

Cole Robinson crobinso at redhat.com
Fri Jan 27 18:34:56 UTC 2012


On my f16 box at least, this tries to free p unconditionally which isn't
always okay, 'p' is freeable only under a limited scope.
---
 src/qemu/qemu_capabilities.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 6dee9d8..5487ecd 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1336,10 +1336,9 @@ fail:
     qemuReportError(VIR_ERR_INTERNAL_ERROR,
                     _("cannot parse %s version number in '%s'"),
                     qemu, p ? p : help);
-
-cleanup:
     VIR_FREE(p);
 
+cleanup:
     return -1;
 }
 
-- 
1.7.7.5




More information about the libvir-list mailing list