antirez 08e52d42b3 Fix MIGRATE closing of cached socket on error.
After investigating issue #3796, it was discovered that MIGRATE
could call migrateCloseSocket() after the original MIGRATE c->argv
was already rewritten as a DEL operation. As a result the host/port
passed to migrateCloseSocket() could be anything, often a NULL pointer
that gets deferenced crashing the server.

Now the socket is closed at an earlier time when there is a socket
error in a later stage where no retry will be performed, before we
rewrite the argument vector. Moreover a check was added so that later,
in the socket_err label, there is no further attempt at closing the
socket if the argument was rewritten.

This fix should resolve the bug reported in #3796.
2017-02-09 09:58:38 +01:00
..
2012-04-13 17:52:33 -07:00
2016-04-25 16:49:57 +03:00
2016-04-25 16:49:57 +03:00
2016-06-07 16:46:00 -04:00
2016-04-04 14:13:46 +02:00
2016-04-04 08:50:58 +02:00
2016-04-04 08:50:58 +02:00
2016-10-19 10:43:40 +02:00
2015-10-01 13:02:25 +02:00
2016-12-30 03:37:52 +02:00
2017-01-02 09:42:32 +02:00
2017-01-02 09:42:32 +02:00
2016-07-27 11:34:25 +02:00
2016-07-27 11:34:25 +02:00
2016-06-14 14:45:28 +02:00
2016-12-30 03:37:52 +02:00
2015-07-27 14:37:58 +02:00
2015-07-27 14:37:58 +02:00
2017-01-27 16:24:14 +01:00
2015-07-27 14:37:58 +02:00
2014-08-08 10:05:32 +02:00
2016-11-11 10:33:48 +08:00
2017-01-08 18:29:22 +01:00
2016-10-10 01:13:20 +09:00
2017-01-18 17:12:07 +01:00
2016-04-25 16:49:57 +03:00
2016-09-14 16:41:05 +02:00
2016-12-30 03:37:52 +02:00
2015-04-27 12:07:49 +02:00
2015-04-27 12:07:49 +02:00
2014-07-02 16:31:22 +02:00
2016-09-12 13:19:05 +02:00
2016-05-10 06:40:05 +02:00
2011-07-06 15:22:00 +02:00
2017-02-01 17:01:31 +01:00