Commit fe417b06 authored by guybe7's avatar guybe7 Committed by Oran Agra
Browse files

ReplicationCron: Prevent invalid access to freed pointer (#8799)

Fixes #8797 

(cherry picked from commit a60016e0)
parent ea0a3764
...@@ -3221,6 +3221,7 @@ void replicationCron(void) { ...@@ -3221,6 +3221,7 @@ void replicationCron(void) {
serverLog(LL_WARNING, "Disconnecting timedout replica (streaming sync): %s", serverLog(LL_WARNING, "Disconnecting timedout replica (streaming sync): %s",
replicationGetSlaveName(slave)); replicationGetSlaveName(slave));
freeClient(slave); freeClient(slave);
continue;
} }
} }
/* We consider disconnecting only diskless replicas because disk-based replicas aren't fed /* We consider disconnecting only diskless replicas because disk-based replicas aren't fed
...@@ -3233,6 +3234,7 @@ void replicationCron(void) { ...@@ -3233,6 +3234,7 @@ void replicationCron(void) {
serverLog(LL_WARNING, "Disconnecting timedout replica (full sync): %s", serverLog(LL_WARNING, "Disconnecting timedout replica (full sync): %s",
replicationGetSlaveName(slave)); replicationGetSlaveName(slave));
freeClient(slave); freeClient(slave);
continue;
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment