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:
@@ -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"
|
||||
|
||||
@@ -436,6 +436,7 @@ eval_compare (const char *expr1, int comparison, const char *expr2)
|
||||
goto end;
|
||||
}
|
||||
rc = (regexec (®ex, expr1, 0, NULL, 0) == 0) ? 1 : 0;
|
||||
regfree (®ex);
|
||||
if (comparison == EVAL_COMPARE_REGEX_NOT_MATCHING)
|
||||
rc ^= 1;
|
||||
goto end;
|
||||
|
||||
Reference in New Issue
Block a user