qemu_command: fix double_close vhostfd in qemuBuildHostdevCommandLine

vhostfd passed to cmd->passfd in virCommandPassFD, virCommandFree will
always close cmd->passfd when qemuBuildSCSIVHostHostdevDevStr failed.

Signed-off-by: Jie Wang <wangjie88@huawei.com>
This commit is contained in:
Jie Wang 2019-04-30 13:24:15 +08:00 committed by Michal Privoznik
parent 596aa144c4
commit 5d5e7875cd

View File

@ -5825,7 +5825,6 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd,
qemuCaps,
vhostfdName))) {
VIR_FREE(vhostfdName);
VIR_FORCE_CLOSE(vhostfd);
return -1;
}
virCommandAddArg(cmd, devstr);