summaryrefslogtreecommitdiff
path: root/src/core/wee-eval.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-01-26 20:04:05 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-01-26 20:04:05 +0100
commit58c615f33b0715d7fc89d95a7d6a5cfd692b3728 (patch)
treef728c511ee5e1abaa63cf11f6f451f292d10547b /src/core/wee-eval.c
parentf566de5d602ef426b06cf4a67f66ac37cbd7a5ac (diff)
downloadweechat-58c615f33b0715d7fc89d95a7d6a5cfd692b3728.zip
core: fix memory leak in regex matching when evaluating expression
Diffstat (limited to 'src/core/wee-eval.c')
-rw-r--r--src/core/wee-eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/wee-eval.c b/src/core/wee-eval.c
index 739db81e5..700550cea 100644
--- a/src/core/wee-eval.c
+++ b/src/core/wee-eval.c
@@ -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;