File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ PHP NEWS
1717 . Fixed bug GH-20081 (access to uninitialized vars in preload_load()).
1818 (Arnaud)
1919
20+ - Phar:
21+ . Fix memory leak of argument in webPhar. (nielsdos)
22+
2023- Random:
2124 . Fix Randomizer::__serialize() w.r.t. INDIRECTs. (nielsdos)
2225
Original file line number Diff line number Diff line change @@ -697,12 +697,15 @@ PHP_METHOD(Phar, webPhar)
697697 rewrite_fci .retval = & retval ;
698698
699699 if (FAILURE == zend_call_function (& rewrite_fci , & rewrite_fcc )) {
700+ zval_ptr_dtor_str (& params );
700701 if (!EG (exception )) {
701702 zend_throw_exception_ex (phar_ce_PharException , 0 , "phar error: failed to call rewrite callback" );
702703 }
703704 goto cleanup_fail ;
704705 }
705706
707+ zval_ptr_dtor_str (& params );
708+
706709 if (Z_TYPE_P (rewrite_fci .retval ) == IS_UNDEF || Z_TYPE (retval ) == IS_UNDEF ) {
707710 zend_throw_exception_ex (phar_ce_PharException , 0 , "phar error: rewrite callback must return a string or false" );
708711 goto cleanup_fail ;
@@ -728,7 +731,6 @@ PHP_METHOD(Phar, webPhar)
728731 zend_throw_exception_ex (phar_ce_PharException , 0 , "phar error: rewrite callback must return a string or false" );
729732
730733cleanup_fail :
731- zval_ptr_dtor (& params );
732734 if (free_pathinfo ) {
733735 efree (path_info );
734736 }
You can’t perform that action at this time.
0 commit comments