Skip to content

Commit e60f880

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: Fix build: use php_globfree wrapper in ZipArchive::addGlob early returns
2 parents 9b8a647 + 556757d commit e60f880

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/zip/php_zip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,14 +676,14 @@ int php_zip_glob(zend_string *spattern, zend_long flags, zval *return_value) /*
676676

677677
/* now catch the FreeBSD style of "no matches" */
678678
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
679-
globfree(&globbuf);
679+
php_globfree(&globbuf);
680680
return 0;
681681
}
682682

683683
/* we assume that any glob pattern will match files from one directory only
684684
so checking the dirname of the first match should be sufficient */
685685
if (ZIP_OPENBASEDIR_CHECKPATH(globbuf.gl_pathv[0])) {
686-
globfree(&globbuf);
686+
php_globfree(&globbuf);
687687
return -1;
688688
}
689689

0 commit comments

Comments
 (0)