From a5b00ec9793b0a8a20074ffb801615c347e66709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 25 Mar 2017 14:09:01 +0100 Subject: trigger: check that regex pointers are not NULL in function "trigger_regex_free" --- src/plugins/trigger/trigger.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/trigger') diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index 485fda2c2..9d624dcdd 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -482,6 +482,9 @@ trigger_regex_free (int *regex_count, struct t_trigger_regex **regex) { int i; + if (!regex_count || !regex) + return; + if (*regex_count > 0) { for (i = 0; i < *regex_count; i++) -- cgit v1.2.3