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 <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2015-07-14 15:42:50 +02:00
parent 4749fec10d
commit cd043390ff

View File

@ -4375,8 +4375,8 @@ qemuMigrationRun(virQEMUDriverPtr driver,
if (spec->fwdType != MIGRATION_FWD_DIRECT) { if (spec->fwdType != MIGRATION_FWD_DIRECT) {
if (iothread && qemuMigrationStopTunnel(iothread, ret < 0) < 0) if (iothread && qemuMigrationStopTunnel(iothread, ret < 0) < 0)
ret = -1; ret = -1;
VIR_FORCE_CLOSE(fd);
} }
VIR_FORCE_CLOSE(fd);
if (priv->job.completed) { if (priv->job.completed) {
qemuDomainJobInfoUpdateTime(priv->job.completed); qemuDomainJobInfoUpdateTime(priv->job.completed);