1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

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

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;