Skip to content

Commit c7b4cd1

Browse files
committed
fix HANDLE leak
1 parent ae81e8f commit c7b4cd1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

TSRM/tsrm_win32.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,12 @@ TSRM_API int shmget(int key, int size, int flags)
616616
}
617617
} else {
618618
if (flags & IPC_EXCL) {
619+
if (shm_handle) {
620+
CloseHandle(shm_handle);
621+
}
622+
if (info_handle) {
623+
CloseHandle(info_handle);
624+
}
619625
return -1;
620626
}
621627
}

0 commit comments

Comments
 (0)