Skip to content

Commit

Permalink
fix HANDLE leak
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Aug 29, 2016
1 parent ae81e8f commit c7b4cd1
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 @@ -616,6 +616,12 @@ TSRM_API int shmget(int key, int size, int flags)
}

This comment has been minimized.

Copy link
@staabm

staabm Aug 30, 2016

Contributor

should this return close successfully created handles in case only one could not be created?

} else {
if (flags & IPC_EXCL) {
if (shm_handle) {
CloseHandle(shm_handle);
}
if (info_handle) {
CloseHandle(info_handle);
}
return -1;
}
}
Expand Down

0 comments on commit c7b4cd1

Please sign in to comment.