Skip to content

Commit 8cd085a

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Fix memory leak in zip when encountering empty glob result
2 parents 66eb5e7 + 1b49d0e commit 8cd085a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

ext/zip/php_zip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
628628
can be used for simple glob() calls without further error
629629
checking.
630630
*/
631-
array_init(return_value);
632631
return 0;
633632
}
634633
#endif
@@ -637,7 +636,6 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
637636

638637
/* now catch the FreeBSD style of "no matches" */
639638
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
640-
array_init(return_value);
641639
return 0;
642640
}
643641

0 commit comments

Comments
 (0)