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