]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu_command: fix double_close vhostfd in qemuBuildHostdevCommandLine
authorJie Wang <wangjie88@huawei.com>
Tue, 30 Apr 2019 05:24:15 +0000 (13:24 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 30 Apr 2019 09:10:36 +0000 (11:10 +0200)
vhostfd passed to cmd->passfd in virCommandPassFD, virCommandFree will
always close cmd->passfd when qemuBuildSCSIVHostHostdevDevStr failed.

Signed-off-by: Jie Wang <wangjie88@huawei.com>
src/qemu/qemu_command.c

index 1425d97b1ec807a458591b6292334d632d586e13..bf1fb539b11348403501f4d10b2908ec6c250c61 100644 (file)
@@ -5825,7 +5825,6 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd,
                                                                qemuCaps,
                                                                vhostfdName))) {
                     VIR_FREE(vhostfdName);
-                    VIR_FORCE_CLOSE(vhostfd);
                     return -1;
                 }
                 virCommandAddArg(cmd, devstr);