From 58b8cf417822d71b79bb6a2abb71c6cac0212fc0 Mon Sep 17 00:00:00 2001 From: duzhuolin Date: Thu, 27 Jul 2023 22:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=85=E5=AD=98=E6=B3=84?= =?UTF-8?q?=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/cbb/workload/statctl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gausskernel/cbb/workload/statctl.cpp b/src/gausskernel/cbb/workload/statctl.cpp index 798cbe9e8..a62d0803c 100644 --- a/src/gausskernel/cbb/workload/statctl.cpp +++ b/src/gausskernel/cbb/workload/statctl.cpp @@ -1182,6 +1182,8 @@ void WLMCleanUpNodeInternal(const Qid* qid) /* No threads already, remove the info from the hash table. */ if (info->threadCount <= 0) { + pfree_ext(info->qband); + pfree_ext(info->statement); hash_search(g_instance.wlm_cxt->stat_manager.collect_info_hashtbl, qid, HASH_REMOVE, NULL); } } @@ -4190,8 +4192,10 @@ bool WLMInsertCollectInfoIntoHashTable(void) USE_MEMORY_CONTEXT(g_instance.wlm_cxt->query_resource_track_mcxt); if (u_sess->attr.attr_resource.query_band) { + pfree_ext(pDNodeInfo->qband); pDNodeInfo->qband = pstrdup(u_sess->attr.attr_resource.query_band); } + pfree_ext(pDNodeInfo->statement); pDNodeInfo->statement = pstrdup(t_thrd.wlm_cxt.collect_info->sdetail.statement);