1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 21:06:38 +02:00

trigger: fix memory leak when allocating a new trigger with several regex

This commit is contained in:
Sébastien Helleu
2014-10-26 12:32:29 +01:00
parent 3f5a810254
commit 125adea650
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -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;