signal: fix memory leak, wipe signal_t

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-08-21 23:11:44 +02:00
parent 9c785c40f6
commit 41580c91d8
1 changed files with 7 additions and 1 deletions

View File

@ -40,7 +40,13 @@ signal_cmp(const void *a, const void *b)
return x->id > y->id ? 1 : (x->id < y->id ? -1 : 0);
}
DO_BARRAY(signal_t, signal, DO_NOTHING, signal_cmp)
static inline void
signal_wipe(signal_t *sig)
{
cptr_array_wipe(&sig->sigfuncs);
}
DO_BARRAY(signal_t, signal, signal_wipe, signal_cmp)
static inline signal_t *
signal_array_getbyid(signal_array_t *arr, unsigned long id)