fix/TD-27891

This commit is contained in:
dmchen 2023-12-15 02:43:55 +00:00 committed by dm chen
parent c113624195
commit 4f5dd57b65
1 changed files with 4 additions and 1 deletions

View File

@ -24,6 +24,7 @@
#include "tglobal.h"
#include "mnode.h"
#include "audit.h"
#include "osMemory.h"
SAudit tsAudit = {0};
char* tsAuditUri = "/audit";
@ -38,7 +39,9 @@ int32_t auditInit(const SAuditCfg *pCfg) {
void auditCleanup() {
tsLogFp = NULL;
taosArrayDestroy(tsAudit.records);
taosThreadMutexLock(&tsAudit.lock);
taosArrayDestroyP(tsAudit.records, (FDelete)taosMemoryFree);
taosThreadMutexUnlock(&tsAudit.lock);
tsAudit.records = NULL;
taosThreadMutexDestroy(&tsAudit.lock);
}