summaryrefslogtreecommitdiff
path: root/src/plugins/trigger
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-10-26 12:32:29 +0100
committerSébastien Helleu <flashcode@flashtux.org>2014-10-26 12:32:29 +0100
commit125adea6503d01fe776cecb68db931de00aa2876 (patch)
tree0e025dbf02743648f13ba6eb3caadc8824409f65 /src/plugins/trigger
parent3f5a810254db47c0943007ca7ff749f9b78145ee (diff)
downloadweechat-125adea6503d01fe776cecb68db931de00aa2876.zip
trigger: fix memory leak when allocating a new trigger with several regex
Diffstat (limited to 'src/plugins/trigger')
-rw-r--r--src/plugins/trigger/trigger.c2
1 files changed, 2 insertions, 0 deletions
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;