File b03eba13-libxl-segfault-fix.patch of Package libvirt.openSUSE_13.1_Update
commit b03eba137616a9c48921c017d9c1142a47020dc2
Author: Bamvor Jian Zhang <bjzhang@suse.com>
Date: Fri Dec 20 15:14:42 2013 +0800
libxl: fix segfault when domain create fail
there is a segfault in libxl logging in libxl_ctx_free when domain
create fail. because the log output handler vmessage is freed by
xtl_logger_destroy before libxl_ctx_free in virDomainObjListRemove.
move xtl_logger_destroy after libxl_ctx_free could fix this bug.
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Index: libvirt-1.1.2/src/libxl/libxl_driver.c
===================================================================
--- libvirt-1.1.2.orig/src/libxl/libxl_driver.c
+++ libvirt-1.1.2/src/libxl/libxl_driver.c
@@ -472,11 +472,10 @@ libxlDomainObjPrivateDispose(void *obj)
virChrdevFree(priv->devs);
+ libxl_ctx_free(priv->ctx);
xtl_logger_destroy(priv->logger);
if (priv->logger_file)
VIR_FORCE_FCLOSE(priv->logger_file);
-
- libxl_ctx_free(priv->ctx);
}
static void