diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-10-26 12:32:29 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-10-26 12:32:29 +0100 |
commit | 125adea6503d01fe776cecb68db931de00aa2876 (patch) | |
tree | 0e025dbf02743648f13ba6eb3caadc8824409f65 /src/plugins/trigger | |
parent | 3f5a810254db47c0943007ca7ff749f9b78145ee (diff) | |
download | weechat-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.c | 2 |
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; |