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

filename is not initialized to NULL while it's unconditionally freed in the error path. Signed-off-by: Philipp Hahn <hahn@univention.de> --- 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

On 02/06/2012 06:13 AM, Philipp Hahn wrote:
filename is not initialized to NULL while it's unconditionally freed in the error path.
Signed-off-by: Philipp Hahn <hahn@univention.de> --- 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;
ACK and pushed. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
Philipp Hahn