shm: fix initialization of rc segment when region is created externally

This commit is contained in:
Alexey Rybalchenko
2023-11-24 12:12:20 +01:00
parent 39f9c35455
commit dc59995f5f
2 changed files with 10 additions and 6 deletions

View File

@@ -146,6 +146,8 @@ struct UnmanagedRegion
LOG(debug) << "Successfully zeroed free memory of region " << id << ".";
}
InitializeRefCountSegment(cfg.rcSegmentSize);
if (fControlling && created) {
Register(shmId, cfg);
}