File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len)
467
467
endw -- ;
468
468
}
469
469
if (endw < pathw ) {
470
+ free (startw );
470
471
/* The path only contained slashes */
471
472
path [0 ] = PHP_WIN32_IOUTIL_DEFAULT_SLASH ;
472
473
path [1 ] = '\0' ;
@@ -478,6 +479,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len)
478
479
endw -- ;
479
480
}
480
481
if (endw < pathw ) {
482
+ free (startw );
481
483
path [0 ] = '.' ;
482
484
path [1 ] = '\0' ;
483
485
return 1 + len_adjust ;
@@ -488,6 +490,7 @@ PW32IO size_t php_win32_ioutil_dirname(char *path, size_t len)
488
490
endw -- ;
489
491
}
490
492
if (endw < pathw ) {
493
+ free (startw );
491
494
path [0 ] = PHP_WIN32_IOUTIL_DEFAULT_SLASH ;
492
495
path [1 ] = '\0' ;
493
496
return 1 + len_adjust ;
You can’t perform that action at this time.
0 commit comments