mirror of https://gitee.com/openkylin/libvirt.git
conf: Check error from virXMLFormatElement call
Commit id 1bd5a08d
added a call to virXMLFormatElement without
also checking the return status.
Found by Coverity.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>
This commit is contained in:
parent
05c41f4f1d
commit
c1aaa253d2
|
@ -27522,7 +27522,8 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
|||
unit, short_size);
|
||||
}
|
||||
|
||||
virXMLFormatElement(buf, "smm", &attrBuf, &childBuf);
|
||||
if (virXMLFormatElement(buf, "smm", &attrBuf, &childBuf) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue