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 @@ -15,6 +15,9 @@ PHP NEWS
1515 . Fixed bug GH-20081 (access to uninitialized vars in preload_load()).
1616 (Arnaud)
1717
18+ - Phar:
19+ . Fix memory leak of argument in webPhar. (nielsdos)
20+
1821- Random:
1922 . Fix Randomizer::__serialize() w.r.t. INDIRECTs. (nielsdos)
2023
Original file line number Diff line number Diff line change @@ -689,12 +689,15 @@ PHP_METHOD(Phar, webPhar)
689689 rewrite_fci .retval = & retval ;
690690
691691 if (FAILURE == zend_call_function (& rewrite_fci , & rewrite_fcc )) {
692+ zval_ptr_dtor_str (& params );
692693 if (!EG (exception )) {
693694 zend_throw_exception_ex (phar_ce_PharException , 0 , "phar error: failed to call rewrite callback" );
694695 }
695696 goto cleanup_fail ;
696697 }
697698
699+ zval_ptr_dtor_str (& params );
700+
698701 if (Z_TYPE_P (rewrite_fci .retval ) == IS_UNDEF || Z_TYPE (retval ) == IS_UNDEF ) {
699702 zend_throw_exception_ex (phar_ce_PharException , 0 , "phar error: rewrite callback must return a string or false" );
700703 goto cleanup_fail ;
@@ -720,7 +723,6 @@ PHP_METHOD(Phar, webPhar)
720723 zend_throw_exception_ex (phar_ce_PharException , 0 , "phar error: rewrite callback must return a string or false" );
721724
722725cleanup_fail :
723- zval_ptr_dtor (& params );
724726 if (free_pathinfo ) {
725727 efree (path_info );
726728 }
You can’t perform that action at this time.
0 commit comments