Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-05-14 18:45:14 +0300
committerBastien Montagne <bastien@blender.org>2021-05-14 18:50:55 +0300
commit8c80267352f171269a2d1c12c780db86ab27a023 (patch)
treec87e1979c3f66c443744581810c325c8a729bcb2 /intern/clog
parentb11499939c7731e369be37c594142fd16e111ca7 (diff)
CLOG: Fix memleak in own recent improvement to CLOG filter.
Mistake in rBef5782e29744.
Diffstat (limited to 'intern/clog')
-rw-r--r--intern/clog/clog.c4
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;
}
}