Skip to content

Commit 5fa17fb

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: NEWS Fix #79424 ext/zip: don't use gl_pathc after call to globfree
2 parents 099ffc2 + d66a063 commit 5fa17fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/zip/php_zip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,9 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
688688
add_next_index_string(return_value, globbuf.gl_pathv[n]+cwd_skip);
689689
}
690690

691+
ret = globbuf.gl_pathc;
691692
globfree(&globbuf);
692-
return globbuf.gl_pathc;
693+
return ret;
693694
#else
694695
zend_throw_error(NULL, "Glob support is not available");
695696
return 0;

0 commit comments

Comments
 (0)