esx: Fix a potential crash

Initialize ptr data.datastorePathWithoutFileName as NULL, otherwise
it might cause crash when trying to free it in cleanup.
This commit is contained in:
Osier Yang
2011-07-12 17:23:35 +08:00
parent 62dee6fa48
commit 6ddb83efcc
+1
View 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;