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

Fixes #8797
This commit is contained in:
guybe7 2021-04-16 15:56:38 +02:00 committed by GitHub
parent 374401d786
commit a60016e061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3402,6 +3402,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
@ -3414,6 +3415,7 @@ void replicationCron(void) {
serverLog(LL_WARNING, "Disconnecting timedout replica (full sync): %s",
replicationGetSlaveName(slave));
freeClient(slave);
continue;
}
}
}