mirror of
https://github.com/samba-team/samba.git
synced 2025-11-02 20:23:50 +03:00
r4944: every event_add_*() caller was having to call talloc_steal() to take
control of the event, so instead build that into the function. If you pass NULL as mem_ctx then it leaves it as a child of the events structure.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
a3c7417cfe
commit
7f981b9ed9
@@ -165,13 +165,12 @@ struct smbcli_composite *resolve_name_host_send(struct nbt_name *name,
|
||||
fde.flags = EVENT_FD_READ;
|
||||
fde.handler = pipe_handler;
|
||||
fde.private = c;
|
||||
state->fde = event_add_fd(c->event_ctx, &fde);
|
||||
state->fde = event_add_fd(c->event_ctx, &fde, state);
|
||||
if (state->fde == NULL) {
|
||||
close(fd[0]);
|
||||
close(fd[1]);
|
||||
goto failed;
|
||||
}
|
||||
talloc_steal(state, state->fde);
|
||||
|
||||
/* signal handling in posix really sucks - doing this in a library
|
||||
affects the whole app, but what else to do?? */
|
||||
|
||||
Reference in New Issue
Block a user