[CP] [CP] fix cos mem leak
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user