]> granicus.if.org Git - php/commitdiff
fix handle leak
authorAnatol Belski <ab@php.net>
Tue, 10 May 2016 17:59:21 +0000 (19:59 +0200)
committerAnatol Belski <ab@php.net>
Tue, 10 May 2016 17:59:48 +0000 (19:59 +0200)
Zend/zend_virtual_cwd.c

index 512a3037615b5585fc98e29fd2e71bc6b12d5151..c8e42ddc60baef619d555f474d631dda5cc691e1 100644 (file)
@@ -919,6 +919,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
 
                        pbuffer = (REPARSE_DATA_BUFFER *)do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
                        if (pbuffer == NULL) {
+                               CloseHandle(hLink);
                                return -1;
                        }
                        if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer,  MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {