mirror of https://mirror.osredm.com/root/redis.git
ReplicationCron: Prevent invalid access to freed pointer (#8799)
Fixes #8797
(cherry picked from commit a60016e061
)
This commit is contained in:
parent
ea0a376432
commit
fe417b06d6
|
@ -3221,6 +3221,7 @@ void replicationCron(void) {
|
|||
serverLog(LL_WARNING, "Disconnecting timedout replica (streaming sync): %s",
|
||||
replicationGetSlaveName(slave));
|
||||
freeClient(slave);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/* We consider disconnecting only diskless replicas because disk-based replicas aren't fed
|
||||
|
@ -3233,6 +3234,7 @@ void replicationCron(void) {
|
|||
serverLog(LL_WARNING, "Disconnecting timedout replica (full sync): %s",
|
||||
replicationGetSlaveName(slave));
|
||||
freeClient(slave);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue