提交 02555bfe 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 83a517cf
......@@ -6476,7 +6476,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
ret = 0;
cleanup:
if (ret < 0)
VIR_FREE(info->alias);
virDomainDeviceInfoClear(info);
VIR_FREE(type);
VIR_FREE(rombar);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册