From: Jie Wang Date: Tue, 30 Apr 2019 05:24:15 +0000 (+0800) Subject: qemu_command: fix double_close vhostfd in qemuBuildHostdevCommandLine X-Git-Tag: v5.3.0-rc2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d5e7875cd3644857b4ac6cc7f77811702b0e2cc;p=thirdparty%2Flibvirt.git 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 --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1425d97b1e..bf1fb539b1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5825,7 +5825,6 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd, qemuCaps, vhostfdName))) { VIR_FREE(vhostfdName); - VIR_FORCE_CLOSE(vhostfd); return -1; } virCommandAddArg(cmd, devstr);