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 ff1f9b94ef
commit faf577086a
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);
}