diff --git a/deps/xredis-gtid b/deps/xredis-gtid index 3c980262796..7e829465c64 160000 --- a/deps/xredis-gtid +++ b/deps/xredis-gtid @@ -1 +1 @@ -Subproject commit 3c980262796b1b1024c46c9f583d255d79b97e43 +Subproject commit 7e829465c642345e33a045fb903432db14de3db8 diff --git a/src/replication.c b/src/replication.c index ed8e6fdfc50..9e385ea2449 100644 --- a/src/replication.c +++ b/src/replication.c @@ -2185,7 +2185,10 @@ int slaveTryPartialResynchronization(connection *conn, int read_reply) { connSetReadHandler(conn, NULL); ctrip_result = ctrip_slaveTryPartialResynchronizationRead(conn,reply); - if (ctrip_result >= 0) return ctrip_result; + if (ctrip_result >= 0) { + sdsfree(reply); + return ctrip_result; + } if (!strncmp(reply,"+FULLRESYNC",11)) { char *replid = NULL, *offset = NULL;