mirror of
https://github.com/samba-team/samba.git
synced 2025-02-01 05:47:28 +03:00
ctdb-recoverd: Fix memory leak
state is always freed before exiting this function, so allocate fde off it instead of long-lived ctdb context. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13943 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 6a2941e2a9fd6ab2d5b8dbac042b61a7b1b0b914)
This commit is contained in:
parent
f81a971cc2
commit
76c7302105
@ -1135,7 +1135,7 @@ static int helper_run(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx,
|
||||
|
||||
state->done = false;
|
||||
|
||||
fde = tevent_add_fd(rec->ctdb->ev, rec->ctdb, state->fd[0],
|
||||
fde = tevent_add_fd(rec->ctdb->ev, state, state->fd[0],
|
||||
TEVENT_FD_READ, helper_handler, state);
|
||||
if (fde == NULL) {
|
||||
goto fail;
|
||||
|
Loading…
x
Reference in New Issue
Block a user