mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virDomainDeviceInfoParseXML: Clear whole @info on failure
Currently, if parsing of device info fails info->alias is freed. It doesn't make much sense to leave the rest of the struct behind. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
83a517cfe6
commit
02555bfe5c
@ -6476,7 +6476,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
VIR_FREE(info->alias);
|
virDomainDeviceInfoClear(info);
|
||||||
VIR_FREE(type);
|
VIR_FREE(type);
|
||||||
VIR_FREE(rombar);
|
VIR_FREE(rombar);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user