1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-03 12:58:35 +03:00

tevent: use talloc_zero() in tevent_signal.c

This might not be strictly required, but it might
avoid problems in future...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-03-27 14:30:20 +02:00 committed by Ralph Boehme
parent 8a947939e1
commit 601fd81ef2

View File

@ -255,10 +255,10 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev,
}
}
se = talloc(mem_ctx?mem_ctx:ev, struct tevent_signal);
se = talloc_zero(mem_ctx?mem_ctx:ev, struct tevent_signal);
if (se == NULL) return NULL;
sl = talloc(se, struct tevent_common_signal_list);
sl = talloc_zero(se, struct tevent_common_signal_list);
if (!sl) {
talloc_free(se);
return NULL;
@ -303,7 +303,7 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev,
}
}
#endif
sig_state->oldact[signum] = talloc(sig_state, struct sigaction);
sig_state->oldact[signum] = talloc_zero(sig_state, struct sigaction);
if (sig_state->oldact[signum] == NULL) {
talloc_free(se);
return NULL;