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

core: fix memory leak in regex matching when evaluating expression

This commit is contained in:
Sebastien Helleu
2014-01-26 20:04:05 +01:00
parent f566de5d60
commit 58c615f33b
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
== Version 0.4.3 (under dev)
* core: fix memory leak in regex matching when evaluating expression
* core: add signals "signal_sighup" and "signal_sigwinch" (terminal resized)
* core: add command /print, add support of more escaped chars in command
"/input insert"
+1
View File
@@ -436,6 +436,7 @@ eval_compare (const char *expr1, int comparison, const char *expr2)
goto end;
}
rc = (regexec (&regex, expr1, 0, NULL, 0) == 0) ? 1 : 0;
regfree (&regex);
if (comparison == EVAL_COMPARE_REGEX_NOT_MATCHING)
rc ^= 1;
goto end;