mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
core: fix memory leak in regex matching when evaluating expression
This commit is contained in:
@@ -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