Free extra buf if failed to transform index block

This commit is contained in:
DengzhiLiu
2023-03-30 05:07:02 +00:00
committed by ob-robot
parent 6786ec9f6b
commit 09210822e0

View File

@ -1230,6 +1230,11 @@ int ObIndexMicroBlockCache::load_block(
EVENT_INC(ObStatEventIds::IO_READ_PREFETCH_MICRO_COUNT);
EVENT_ADD(ObStatEventIds::IO_READ_PREFETCH_MICRO_BYTES, micro_block_id.size_);
}
if (OB_FAIL(ret) && OB_NOT_NULL(extra_buf)) {
allocator->free(extra_buf);
block_data.extra_buf_ = nullptr;
block_data.extra_size_ = 0;
}
}
}
return ret;