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:
parent
6cff855c73
commit
fe09cd72aa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user