fix: mem free

This commit is contained in:
factosea 2024-04-17 18:12:43 +08:00
parent 8411f25a2b
commit bac72b2dd2
1 changed files with 2 additions and 0 deletions

View File

@ -1230,6 +1230,8 @@ static regex_t *threadGetRegComp(const char *pPattern) {
regerror(ret, &pRegex, msgbuf, tListLen(msgbuf));
uError("Failed to compile regex pattern %s. reason %s", pPattern, msgbuf);
regfree(&pRegex);
taosMemoryFree(pOldPattern);
pOldPattern == NULL;
return NULL;
}
return &pRegex;