From 9d01175c88fc93df660540a817182d3cf9bf454e Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Tue, 21 Jan 2025 11:42:28 +0800 Subject: [PATCH] fix:[TD-33556] tmq close elegantly to avoid invalid read in TD-32585 --- source/client/src/clientTmq.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index f5a487c007..e137bd3ee3 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1612,20 +1612,7 @@ static void tmqMgmtInit(void) { goto END; } - TdThreadMutexAttr attr = {0}; - if (taosThreadMutexAttrInit(&attr) != 0){ - goto END; - } - - if (taosThreadMutexAttrSetType(&attr, PTHREAD_MUTEX_RECURSIVE) != 0){ - goto END; - } - - if (taosThreadMutexInit(&tmqMgmt.lock, &attr) != 0){ - goto END; - } - - if (taosThreadMutexAttrDestroy(&attr) != 0) { + if (taosThreadMutexInit(&tmqMgmt.lock, NULL) != 0){ goto END; }