1
0
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:
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
@@ -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;