]> granicus.if.org Git - php/commitdiff
don't leak handles
authorAnatol Belski <ab@php.net>
Sun, 4 Oct 2015 20:19:51 +0000 (22:19 +0200)
committerAnatol Belski <ab@php.net>
Mon, 5 Oct 2015 19:59:26 +0000 (21:59 +0200)
TSRM/tsrm_win32.c

index 5b8b64a1e14055d0525581bf6a42ba5bfa0c12e2..9f900f2ae6e9796618e436c31530ea3b60a65ba2 100644 (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 {