From 24aff3d680d3cb2abd9d1fae2145bfcd2a935b7c Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Mon, 24 Apr 2023 10:46:32 +0800 Subject: [PATCH] fix: memory leak issue --- source/libs/catalog/src/ctgUtil.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/libs/catalog/src/ctgUtil.c b/source/libs/catalog/src/ctgUtil.c index 0ec7a92b84..a42a189e75 100644 --- a/source/libs/catalog/src/ctgUtil.c +++ b/source/libs/catalog/src/ctgUtil.c @@ -528,11 +528,18 @@ void ctgFreeTaskRes(CTG_TASK_TYPE type, void** pRes) { } break; } + case CTG_TASK_GET_USER: { + if (*pRes) { + SUserAuthRes* pAuth = (SUserAuthRes *)*pRes; + nodesDestroyNode(pAuth->pCond); + taosMemoryFreeClear(*pRes); + } + break; + } case CTG_TASK_GET_TB_HASH: case CTG_TASK_GET_DB_INFO: case CTG_TASK_GET_INDEX_INFO: case CTG_TASK_GET_UDF: - case CTG_TASK_GET_USER: case CTG_TASK_GET_SVR_VER: case CTG_TASK_GET_TB_META: { taosMemoryFreeClear(*pRes); -- GitLab