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

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



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


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