From 125adea6503d01fe776cecb68db931de00aa2876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 26 Oct 2014 12:32:29 +0100 Subject: trigger: fix memory leak when allocating a new trigger with several regex --- src/plugins/trigger/trigger.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/trigger') diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index 8a6650f12..ef190993d 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -572,6 +572,8 @@ trigger_regex_split (const char *str_regex, pos_replace - ptr_regex); if (!(*regex)[index].str_regex) goto memory_error; + if (str_regex_escaped) + free (str_regex_escaped); str_regex_escaped = weechat_string_convert_escaped_chars ((*regex)[index].str_regex); if (!str_regex_escaped) goto memory_error; -- cgit v1.2.3