From ae3aeca8288bbb22c6ef2eac51827409e19e41df Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 12 Nov 2012 18:56:29 +0100 Subject: [PATCH] MIGRATE: fix fd leak due to missing close on error. --- src/migrate.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.45.2