]> git.saurik.com Git - redis.git/commitdiff
MIGRATE: fix fd leak due to missing close on error.
authorantirez <antirez@gmail.com>
Mon, 12 Nov 2012 17:56:29 +0000 (18:56 +0100)
committerantirez <antirez@gmail.com>
Mon, 12 Nov 2012 17:56:29 +0000 (18:56 +0100)
src/migrate.c

index 94aa1e40db664a2d09b97f0b0afb3a11a7ed4f08..86dfe165b9ba4d18a6c3fe081ea79bba97d8dece 100644 (file)
@@ -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;
     }