提交 fe09cd72 编写于 作者: M Marc-André Lureau 提交者: Ján Tomko

qemu_firmware: only set nfeatures on success

The field is set just before returning on success.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 6cff855c
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册