CLOG: Fix memleak in own recent improvement to CLOG filter.

Mistake in rBef5782e29744.
This commit is contained in:
Bastien Montagne 2021-05-14 17:45:14 +02:00
parent b11499939c
commit 8c80267352
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}
}