Skip to content

Commit b9a14f6

Browse files
committed
Properly close shm->segment
1 parent d0d3837 commit b9a14f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

TSRM/tsrm_win32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ TSRM_API int shmget(key_t key, size_t size, int flags)
696696
shm->descriptor = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL);
697697
if (shm->descriptor == NULL) {
698698
SET_ERRNO_FROM_WIN32_CODE(GetLastError());
699+
CloseHandle(shm->segment);
699700
return -1;
700701
}
701702

0 commit comments

Comments
 (0)