From: antirez Date: Mon, 12 Nov 2012 17:56:29 +0000 (+0100) Subject: MIGRATE: fix fd leak due to missing close on error. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/ae3aeca8288bbb22c6ef2eac51827409e19e41df MIGRATE: fix fd leak due to missing close on error. --- diff --git a/src/migrate.c b/src/migrate.c index 94aa1e40..86dfe165 100644 --- a/src/migrate.c +++ b/src/migrate.c @@ -158,6 +158,7 @@ void migrateCommand(redisClient *c) { return; } if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) { + close(fd); addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n")); return; }