Skip to content

Commit

Permalink
fix crash after repl_transfer_s double free
Browse files Browse the repository at this point in the history
  • Loading branch information
amitnagl committed May 7, 2024
1 parent b73dcc2 commit 47d482f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -3729,9 +3729,9 @@ void replicationAbortSyncTransfer(void) {
* Otherwise zero is returned and no operation is performed at all. */
int cancelReplicationHandshake(int reconnect) {
if (server.repl_rdb_conn_state != REPL_RDB_CONN_STATE_NONE) {
replicationAbortSyncTransfer();
abortRdbConnectionSync();
} else if (server.repl_state == REPL_STATE_TRANSFER) {
}
if (server.repl_state == REPL_STATE_TRANSFER) {
replicationAbortSyncTransfer();
server.repl_state = REPL_STATE_CONNECT;
} else if (server.repl_state == REPL_STATE_CONNECTING ||
Expand Down

0 comments on commit 47d482f

Please sign in to comment.