Skip to content

Commit

Permalink
don't leak handles
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Oct 5, 2015
1 parent 3331d87 commit d5bd999
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TSRM/tsrm_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,12 @@ TSRM_API int shmget(int key, int size, int flags)
created = TRUE;
}
if (!shm_handle || !info_handle) {
if (shm_handle) {
CloseHandle(shm_handle);
}
if (info_handle) {
CloseHandle(info_handle);
}
return -1;
}
} else {
Expand Down

0 comments on commit d5bd999

Please sign in to comment.