提交 f28a31fc 编写于 作者: J John Ferlan

qemu: Resolve Coverity FORWARD_NULL

If we jump to cleanup before allocating the 'result', then the call
to virBlkioDeviceArrayClear will deref result causing a problem.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 0311be94
......@@ -7683,8 +7683,10 @@ qemuDomainParseBlkioDeviceStr(char *blkioDeviceStr, const char *type,
_("unable to parse blkio device '%s' '%s'"),
type, blkioDeviceStr);
cleanup:
virBlkioDeviceArrayClear(result, ndevices);
VIR_FREE(result);
if (result) {
virBlkioDeviceArrayClear(result, ndevices);
VIR_FREE(result);
}
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册