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:
John Ferlan 2018-06-08 13:07:55 -04:00
parent 05c41f4f1d
commit c1aaa253d2

View File

@ -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;