Skip to content

Commit 2815fe0

Browse files
committed
fix(shm_win): Use mem::$delete instead of mem::free in release()
The acquire() function allocates id_info_t using mem::$new<id_info_t>(), so the release() function must use mem::$delete(ii) to deallocate it, not mem::free(ii). This ensures proper allocation/deallocation pairing. Issue: Memory allocated with mem::$new must be freed with mem::$delete to maintain consistent memory management semantics.
1 parent b35de5a commit 2815fe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libipc/platform/win/shm_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ std::int32_t release(id_t id) noexcept {
161161
ipc::error("fail release: invalid id (h = null)\n");
162162
}
163163
else ::CloseHandle(ii->h_);
164-
mem::free(ii);
164+
mem::$delete(ii);
165165
return ret;
166166
}
167167

0 commit comments

Comments
 (0)