[BUG.FIX] fix tmp file mem leak when it comes to errors.

This commit is contained in:
Tyshawn
2022-03-11 16:08:56 +08:00
committed by LINxiansheng
parent f10f55af0d
commit 8244e32ee6

View File

@ -986,7 +986,9 @@ int ObTmpTenantFileStore::alloc_macro_block(const int64_t dir_id, const uint64_t
}
if (OB_FAIL(ret) && OB_NOT_NULL(t_mblk)) {
tmp_block_manager_.free_macro_block(t_mblk->get_block_id());
t_mblk->~ObTmpMacroBlock();
allocator_.free(t_mblk);
t_mblk = nullptr;
}
}