From 7237624b37b0313dd5b7021ffbdfd607c3702631 Mon Sep 17 00:00:00 2001 From: kubistika Date: Sun, 12 May 2019 14:02:50 +0300 Subject: [PATCH] bugfix: segfault when calling an event which is not implemented by filter --- server/proxy/pf_filters.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/proxy/pf_filters.c b/server/proxy/pf_filters.c index 171cb4aaf..92d53d2da 100644 --- a/server/proxy/pf_filters.c +++ b/server/proxy/pf_filters.c @@ -181,11 +181,11 @@ BOOL pf_filters_register_new(filters_list* list, const char* module_path, const goto error; } - events = malloc(sizeof(proxyEvents)); + events = calloc(1, sizeof(proxyEvents)); if (events == NULL) { - WLog_ERR(TAG, "pf_filters_register_new(): failed loading external module: %s", module_path); + WLog_ERR(TAG, "pf_filters_register_new(): calloc proxyEvents failed"); goto error; }