CLOG: Fix memleak in own recent improvement to CLOG filter.
Mistake in rBef5782e29744.
This commit is contained in:
parent
b11499939c
commit
8c80267352
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user