avoid mem leak
This commit is contained in:
parent
becc5c51a4
commit
63d9a5dcf3
|
@ -16,12 +16,12 @@
|
|||
#include "tstreamFileState.h"
|
||||
|
||||
#include "query.h"
|
||||
#include "storageapi.h"
|
||||
#include "streamBackendRocksdb.h"
|
||||
#include "taos.h"
|
||||
#include "tcommon.h"
|
||||
#include "thash.h"
|
||||
#include "tsimplehash.h"
|
||||
#include "storageapi.h"
|
||||
|
||||
#define FLUSH_RATIO 0.5
|
||||
#define FLUSH_NUM 4
|
||||
|
@ -420,6 +420,7 @@ int32_t deleteExpiredCheckPoint(SStreamFileState* pFileState, TSKEY mark) {
|
|||
return TSDB_CODE_FAILED;
|
||||
}
|
||||
sscanf(val, "%" PRId64 "", &maxCheckPointId);
|
||||
taosMemoryFree(val);
|
||||
}
|
||||
for (int64_t i = maxCheckPointId; i > 0; i--) {
|
||||
char buf[128] = {0};
|
||||
|
@ -435,9 +436,11 @@ int32_t deleteExpiredCheckPoint(SStreamFileState* pFileState, TSKEY mark) {
|
|||
if (ts < mark) {
|
||||
// statekey winkey.ts < mark
|
||||
forceRemoveCheckpoint(pFileState, i);
|
||||
taosMemoryFreeClear(val);
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
taosMemoryFree(val);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue