diff options
author | Bastien Montagne <bastien@blender.org> | 2021-05-14 18:45:14 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-05-14 18:50:55 +0300 |
commit | 8c80267352f171269a2d1c12c780db86ab27a023 (patch) | |
tree | c87e1979c3f66c443744581810c325c8a729bcb2 /intern | |
parent | b11499939c7731e369be37c594142fd16e111ca7 (diff) |
CLOG: Fix memleak in own recent improvement to CLOG filter.
Mistake in rBef5782e29744.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/clog/clog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/clog/clog.c b/intern/clog/clog.c index 50a51ebe913..416ea25ee0c 100644 --- a/intern/clog/clog.c +++ b/intern/clog/clog.c @@ -322,7 +322,9 @@ static bool clg_ctx_filter_check(CLogContext *ctx, const char *identifier) if (flt->match[0] == '*' && flt->match[len - 1] == '*') { char *match = MEM_callocN(sizeof(char) * len - 1, __func__); memcpy(match, flt->match + 1, len - 2); - if (strstr(identifier, match) != NULL) { + const bool success = (strstr(identifier, match) != NULL); + MEM_freeN(match); + if (success) { return (bool)i; } } |