/* restore old handler, if any */
if (sig_state->oldact[se->signum]) {
sigaction(se->signum, sig_state->oldact[se->signum], NULL);
+ talloc_free(sig_state->oldact[se->signum]);
sig_state->oldact[se->signum] = NULL;
}
#ifdef SA_SIGINFO
return NULL;
}
if (sigaction(signum, &act, sig_state->oldact[signum]) == -1) {
+ talloc_free(sig_state->oldact[signum]);
+ sig_state->oldact[signum] = NULL;
talloc_free(se);
return NULL;
}
if (sig_state->sig_handlers[se->signum] == NULL) {
if (sig_state->oldact[se->signum]) {
sigaction(se->signum, sig_state->oldact[se->signum], NULL);
+ talloc_free(sig_state->oldact[se->signum]);
sig_state->oldact[se->signum] = NULL;
}
}