fix leak
authorMichael Wallner <mike@php.net>
Mon, 15 Jun 2015 14:02:43 +0000 (16:02 +0200)
committerMichael Wallner <mike@php.net>
Mon, 15 Jun 2015 14:02:43 +0000 (16:02 +0200)
php_http_env_response.c

index 9f01814cb703a0dc6e86d8f0a468fe4b42b76975..2b633c1871ca1bd0de1dd565fc12f2cbbc73cae5 100644 (file)
@@ -1158,7 +1158,9 @@ static PHP_METHOD(HttpEnvResponse, __invoke)
 
                PHP_HTTP_ENV_RESPONSE_OBJECT_INIT(obj);
 
-               php_http_message_object_init_body_object(obj);
+               if (!obj->body) {
+                       php_http_message_object_init_body_object(obj);
+               }
 
                if (ob_flags & PHP_OUTPUT_HANDLER_CLEAN) {
                        php_stream_truncate_set_size(php_http_message_body_stream(obj->message->body), 0);