From b3f50d3e145cfa849f7a7ee60840749e03cab77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bend=C3=ADk?= Date: Wed, 1 Mar 2023 08:40:18 +0100 Subject: [PATCH] Added signal array memory deallocation --- common/signal.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/signal.h b/common/signal.h index ff6153eeb..fd2d413cf 100644 --- a/common/signal.h +++ b/common/signal.h @@ -98,8 +98,12 @@ signal_disconnect(signal_array_t *arr, const char *name, const void *ref) if(ref == *func) { cptr_array_remove(&sigfound->sigfuncs, func); - if(sigfound->sigfuncs.len == 0) + if(sigfound->sigfuncs.len == 0) { + if(sigfound->sigfuncs.tab) { + p_delete(&sigfound->sigfuncs.tab); + } signal_array_remove(arr, sigfound); + } return true; } }