diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-26 20:04:05 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-26 20:04:05 +0100 |
commit | 58c615f33b0715d7fc89d95a7d6a5cfd692b3728 (patch) | |
tree | f728c511ee5e1abaa63cf11f6f451f292d10547b /src/core/wee-eval.c | |
parent | f566de5d602ef426b06cf4a67f66ac37cbd7a5ac (diff) | |
download | weechat-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.c | 1 |
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 (®ex, expr1, 0, NULL, 0) == 0) ? 1 : 0; + regfree (®ex); if (comparison == EVAL_COMPARE_REGEX_NOT_MATCHING) rc ^= 1; goto end; |