delete detail
This commit is contained in:
parent
181642e6a1
commit
65f69b5fe4
|
@ -37,10 +37,17 @@ int32_t auditInit(const SAuditCfg *pCfg) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static FORCE_INLINE void auditDeleteRecord(SAuditRecord * record) {
|
||||
if (record) {
|
||||
taosMemoryFree(record->detail);
|
||||
taosMemoryFree(record);
|
||||
}
|
||||
}
|
||||
|
||||
void auditCleanup() {
|
||||
tsLogFp = NULL;
|
||||
taosThreadMutexLock(&tsAudit.lock);
|
||||
taosArrayDestroyP(tsAudit.records, (FDelete)taosMemoryFree);
|
||||
taosArrayDestroyP(tsAudit.records, (FDelete)auditDeleteRecord);
|
||||
taosThreadMutexUnlock(&tsAudit.lock);
|
||||
tsAudit.records = NULL;
|
||||
taosThreadMutexDestroy(&tsAudit.lock);
|
||||
|
|
Loading…
Reference in New Issue