From: Michal Privoznik Date: Tue, 14 Jul 2015 13:42:50 +0000 (+0200) Subject: qemuMigrationRun: Don't leak @fd X-Git-Tag: v1.2.18-rc1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd043390ffddb5693dcd5056682180ceff8b5b55;p=thirdparty%2Flibvirt.git qemuMigrationRun: Don't leak @fd If we are migrating to an UNIX socket, we accept() a connection from qemu and use that FD to set up a tunnel. However, the FD is not closed as often as it should be. Signed-off-by: Michal Privoznik --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index d78911025a..f5866c4121 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -4375,8 +4375,8 @@ qemuMigrationRun(virQEMUDriverPtr driver, if (spec->fwdType != MIGRATION_FWD_DIRECT) { if (iothread && qemuMigrationStopTunnel(iothread, ret < 0) < 0) ret = -1; - VIR_FORCE_CLOSE(fd); } + VIR_FORCE_CLOSE(fd); if (priv->job.completed) { qemuDomainJobInfoUpdateTime(priv->job.completed);