[CP] [CP] fix cos mem leak

This commit is contained in:
obdev
2024-06-27 07:58:09 +00:00
committed by ob-robot
parent cbb278a5c1
commit 311a5f5a8a

View File

@ -514,9 +514,7 @@ ObStorageCosBase::~ObStorageCosBase()
void ObStorageCosBase::reset()
{
if (is_opened_) {
handle_.reset();
}
handle_.reset();
is_opened_ = false;
}
@ -836,6 +834,9 @@ int ObStorageCosReader::pread(
KP(buf), K(buf_size), K(offset), K(get_data_size), K_(has_meta));
}
}
if (OB_NOT_NULL(tmp_cos_handle)) {
qcloud_cos::ObCosWrapper::destroy_cos_handle(tmp_cos_handle);
}
}
return ret;
}