From: Stefan Metzmacher Date: Tue, 27 Mar 2018 12:30:20 +0000 (+0200) Subject: tevent: use talloc_zero() in tevent_signal.c X-Git-Tag: tevent-0.9.37~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=601fd81ef274ee42121d71d2167a62fdcb759409;p=thirdparty%2Fsamba.git 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 Reviewed-by: Ralph Boehme --- diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c index 6bb69d77d7a..73b8de798f6 100644 --- a/lib/tevent/tevent_signal.c +++ b/lib/tevent/tevent_signal.c @@ -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;