mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: phar: Fix memory leak of argument in webPhar
This commit is contained in:
@@ -697,12 +697,15 @@ PHP_METHOD(Phar, webPhar)
|
||||
rewrite_fci.retval = &retval;
|
||||
|
||||
if (FAILURE == zend_call_function(&rewrite_fci, &rewrite_fcc)) {
|
||||
zval_ptr_dtor_str(¶ms);
|
||||
if (!EG(exception)) {
|
||||
zend_throw_exception_ex(phar_ce_PharException, 0, "phar error: failed to call rewrite callback");
|
||||
}
|
||||
goto cleanup_fail;
|
||||
}
|
||||
|
||||
zval_ptr_dtor_str(¶ms);
|
||||
|
||||
if (Z_TYPE_P(rewrite_fci.retval) == IS_UNDEF || Z_TYPE(retval) == IS_UNDEF) {
|
||||
zend_throw_exception_ex(phar_ce_PharException, 0, "phar error: rewrite callback must return a string or false");
|
||||
goto cleanup_fail;
|
||||
@@ -728,7 +731,6 @@ PHP_METHOD(Phar, webPhar)
|
||||
zend_throw_exception_ex(phar_ce_PharException, 0, "phar error: rewrite callback must return a string or false");
|
||||
|
||||
cleanup_fail:
|
||||
zval_ptr_dtor(¶ms);
|
||||
if (free_pathinfo) {
|
||||
efree(path_info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user