Merge pull request #20027 from taosdata/fix/TS-2658-MAIN
fix: free thread save memory before set null
This commit is contained in:
commit
12d983074f
|
@ -788,6 +788,9 @@ int writeVarNames(int type, TAOS_RES* tres) {
|
|||
|
||||
void setThreadNull(int type) {
|
||||
taosThreadMutexLock(&tiresMutex);
|
||||
if(threads[type]) {
|
||||
taosMemoryFree(threads[type]);
|
||||
}
|
||||
threads[type] = NULL;
|
||||
taosThreadMutexUnlock(&tiresMutex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue