未验证 提交 12d98307 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #20027 from taosdata/fix/TS-2658-MAIN

fix: free thread save memory before set null
...@@ -788,6 +788,9 @@ int writeVarNames(int type, TAOS_RES* tres) { ...@@ -788,6 +788,9 @@ int writeVarNames(int type, TAOS_RES* tres) {
void setThreadNull(int type) { void setThreadNull(int type) {
taosThreadMutexLock(&tiresMutex); taosThreadMutexLock(&tiresMutex);
if(threads[type]) {
taosMemoryFree(threads[type]);
}
threads[type] = NULL; threads[type] = NULL;
taosThreadMutexUnlock(&tiresMutex); taosThreadMutexUnlock(&tiresMutex);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册