fix:converity scan error

This commit is contained in:
cyang 2023-02-24 17:02:30 +08:00
parent 91d5df423f
commit 21234a33dc
1 changed files with 6 additions and 2 deletions

View File

@ -1335,8 +1335,12 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) {
}
}
blockDataDestroy(pDelBlock);
taosMemoryFree(pRef);
int32_t ref = atomic_sub_fetch_32(pRef, 1);
/*A(ref >= 0);*/
if (ref == 0) {
blockDataDestroy(pDelBlock);
taosMemoryFree(pRef);
}
#if 0
SStreamDataBlock* pStreamBlock = taosAllocateQitem(sizeof(SStreamDataBlock), DEF_QITEM, 0);