mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +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>
This commit is contained in:
parent
dc89db8ca6
commit
6a2941e2a9
@ -1134,7 +1134,7 @@ static int helper_run(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
state->done = false;
|
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);
|
TEVENT_FD_READ, helper_handler, state);
|
||||||
if (fde == NULL) {
|
if (fde == NULL) {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user