From 41580c91d82a98da0513ff5ff082eba2b0d043a1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 21 Aug 2009 23:11:44 +0200 Subject: [PATCH] signal: fix memory leak, wipe signal_t Signed-off-by: Julien Danjou --- common/signal.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/signal.h b/common/signal.h index 477b61f7..56e5faaa 100644 --- a/common/signal.h +++ b/common/signal.h @@ -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)