!4605 修复lsc退出时,未考虑空指针场景的问题

Merge pull request !4605 from pengjiong/fix_case
This commit is contained in:
opengauss_bot
2023-12-13 01:02:21 +00:00
committed by Gitee

View File

@ -44,6 +44,9 @@ public:
void ResetInitFlag(bool include_shared)
{
for (int cache_id = 0; cache_id < SysCacheSize; cache_id++) {
if (local_systupcaches[cache_id] == NULL) {
continue;
}
if (!include_shared && local_systupcaches[cache_id]->GetCCRelIsShared()) {
continue;
}
@ -73,6 +76,9 @@ public:
void ReleaseGlobalRefcount(bool include_shared)
{
for (int cache_id = 0; cache_id < SysCacheSize; cache_id++) {
if (local_systupcaches[cache_id] == NULL) {
continue;
}
if (!include_shared && local_systupcaches[cache_id]->GetCCRelIsShared()) {
continue;
}