missing bit
authorMichael Wallner <mike@php.net>
Thu, 9 Jun 2022 08:32:18 +0000 (10:32 +0200)
committerMichael Wallner <mike@php.net>
Thu, 9 Jun 2022 08:32:18 +0000 (10:32 +0200)
src/php_http_env_response.c

index f5d2da9846c6d4958df30e7db6c5170a79a0d780..6717fe543b9e573e5a060c56307c4c9c30198da7 100644 (file)
@@ -363,12 +363,12 @@ static ZEND_RESULT_CODE php_http_env_response_send_head(php_http_env_response_t
                php_http_version_t v;
                zend_string *zs = zval_get_string(zoption);
 
-               zval_ptr_dtor(zoption);
                if (EXPECTED(zs->len && php_http_version_parse(&v, zs->val))) {
                        ret = r->ops->set_protocol_version(r, &v);
                        php_http_version_dtor(&v);
                }
                zend_string_release(zs);
+               zval_ptr_dtor(zoption);
        }
 
        if (ret != SUCCESS) {