fix:[TD-33556] tmq close elegantly to avoid invalid read in TD-32585
This commit is contained in:
parent
326ea19c91
commit
9d01175c88
|
@ -1612,20 +1612,7 @@ static void tmqMgmtInit(void) {
|
||||||
goto END;
|
goto END;
|
||||||
}
|
}
|
||||||
|
|
||||||
TdThreadMutexAttr attr = {0};
|
if (taosThreadMutexInit(&tmqMgmt.lock, NULL) != 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) {
|
|
||||||
goto END;
|
goto END;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue