diff --git a/source/libs/index/src/indexFilter.c b/source/libs/index/src/indexFilter.c index 075408f1b34954c215cc9fc11fbc08b384014001..cccd7ace05290aac3f015a0f04e87131c2a692f9 100644 --- a/source/libs/index/src/indexFilter.c +++ b/source/libs/index/src/indexFilter.c @@ -857,9 +857,15 @@ static int32_t sifGetFltHint(SNode *pNode, SIdxFltStatus *status) { SIF_ERR_RET(TSDB_CODE_QRY_APP_ERROR); } *status = res->status; - sifFreeParam(res); taosHashRemove(ctx.pRes, (void *)&pNode, POINTER_BYTES); + + void *iter = taosHashIterate(ctx.pRes, NULL); + while (iter != NULL) { + SIFParam *data = (SIFParam *)iter; + sifFreeParam(data); + iter = taosHashIterate(ctx.pRes, iter); + } taosHashCleanup(ctx.pRes); return code; }