summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc1
-rw-r--r--src/plugins/trigger/trigger.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 7be036d02..706b2711d 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -49,6 +49,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* relay: use comma separator in option relay.irc.backlog_tags, check the value
of option when it is changed with /set
* relay: remove "::ffff:" from IPv4-mapped IPv6 client address (closes #111)
+* trigger: fix memory leak when allocating a new trigger with several regex
== Version 1.0.1 (2014-09-28)
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;