tevent: use talloc_zero() in tevent_signal.c
authorStefan Metzmacher <metze@samba.org>
Tue, 27 Mar 2018 12:30:20 +0000 (14:30 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 11 Jul 2018 21:04:20 +0000 (23:04 +0200)
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>
lib/tevent/tevent_signal.c

index 6bb69d77d7a5f0654fcdacde40510fdef7f76e24..73b8de798f6936a94551a37318bfb95e4296aadf 100644 (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;
 
        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;
        if (!sl) {
                talloc_free(se);
                return NULL;
@@ -303,7 +303,7 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev,
                        }
                }
 #endif
                        }
                }
 #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;
                if (sig_state->oldact[signum] == NULL) {
                        talloc_free(se);
                        return NULL;