Skip to content

Commit 6b63d80

Browse files
committed
fix handle leak
1 parent 90f43ca commit 6b63d80

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Zend/zend_virtual_cwd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,7 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
919919

920920
pbuffer = (REPARSE_DATA_BUFFER *)do_alloca(MAXIMUM_REPARSE_DATA_BUFFER_SIZE, use_heap_large);
921921
if (pbuffer == NULL) {
922+
CloseHandle(hLink);
922923
return -1;
923924
}
924925
if(!DeviceIoControl(hLink, FSCTL_GET_REPARSE_POINT, NULL, 0, pbuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &retlength, NULL)) {

0 commit comments

Comments
 (0)