[PATCH] xen-xm: SIGSEGV in xenXMDomainDefineXML: filename

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

 



filename is not initialized to NULL while it's unconditionally freed in
the error path.

Signed-off-by: Philipp Hahn <hahn@xxxxxxxxxxxxx>
---
 src/xen/xm_internal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 3cb315a..5acac8b 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -1070,7 +1070,7 @@ int xenXMDomainCreate(virDomainPtr domain) {
 virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml)
 {
     virDomainPtr ret;
-    char *filename;
+    char *filename = NULL;
     const char *oldfilename;
     virDomainDefPtr def = NULL;
     virConfPtr conf = NULL;
-- 
1.7.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]