don't leak handles

This commit is contained in:
Anatol Belski 2015-10-04 22:19:51 +02:00
parent 3331d870aa
commit d5bd999a8f

View File

@ -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 {