]> granicus.if.org Git - php/commitdiff
Fix double free on unpack error
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Sep 2020 21:31:56 +0000 (23:31 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 22 Sep 2020 21:31:56 +0000 (23:31 +0200)
ext/standard/pack.c

index bfa6708f66d862b3e4319aea5239957eb08ecab7..e14bbbcedbd8e450c01b2e24d92ea52bbb2b697a 100644 (file)
@@ -846,7 +846,6 @@ PHP_FUNCTION(unpack)
                                break;
 #else
                                zend_value_error("64-bit format codes are not available for 32-bit versions of PHP");
-                               zend_array_destroy(Z_ARR_P(return_value));
                                RETURN_THROWS();
 #endif
 
@@ -866,7 +865,6 @@ PHP_FUNCTION(unpack)
 
                        default:
                                zend_value_error("Invalid format type %c", type);
-                               zend_array_destroy(Z_ARR_P(return_value));
                                RETURN_THROWS();
                }