]> xenbits.xensource.com Git - libvirt.git/commitdiff
esx: Fix a potential crash
authorOsier Yang <jyang@redhat.com>
Tue, 12 Jul 2011 09:23:35 +0000 (17:23 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 12 Jul 2011 09:23:35 +0000 (17:23 +0800)
Initialize ptr data.datastorePathWithoutFileName as NULL, otherwise
it might cause crash when trying to free it in cleanup.

src/esx/esx_driver.c

index ddb8c23bae22e1aac0900de5452fa2213d40865b..ae614a6b24244245edb5c122a222186bba45a55e 100644 (file)
@@ -2698,6 +2698,7 @@ esxDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
     char *vmx = NULL;
     virVMXContext ctx;
     esxVMX_Data data;
+    data.datastorePathWithoutFileName = NULL;
     virDomainDefPtr def = NULL;
     char *xml = NULL;