Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix minor repldbfd leak in updateReplicasWaitingBgsave if fstat fails (…
…valkey-io#1226) In the old code, if fstat fails, replica->repldbfd will hold the fd and we are doing a free client. And in freeClient, we check and close only if repl_state == REPLICA_STATE_SEND_BULK. So if fstat fails, we will leak the fd. We can also extend freeClient to handle REPLICA_STATE_WAIT_BGSAVE_END as well, but here seems to be a more friendly (and safer) way. Signed-off-by: Binbin <[email protected]>
- Loading branch information