From 5e5cbea1834960e4f24f34d429d0e18ce352e433 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 24 Nov 2022 18:18:30 +0800 Subject: [PATCH] fix mem leak --- source/libs/index/src/indexFilter.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/libs/index/src/indexFilter.c b/source/libs/index/src/indexFilter.c index 075408f1b3..cccd7ace05 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; } -- GitLab