1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

qemu_firmware: only set nfeatures on success

The field is set just before returning on success.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-06-05 12:31:01 +02:00 committed by Ján Tomko
parent 6cff855c73
commit fe09cd72aa

View File

@ -592,8 +592,6 @@ qemuFirmwareFeatureParse(const char *path,
if (VIR_ALLOC_N(features, nfeatures) < 0)
return -1;
fw->nfeatures = nfeatures;
for (i = 0; i < nfeatures; i++) {
virJSONValuePtr item = virJSONValueArrayGet(featuresJSON, i);
const char *tmpStr = virJSONValueGetString(item);