- fix possible leaks when changing message type
authorMichael Wallner <mike@php.net>
Wed, 24 Jan 2007 09:33:46 +0000 (09:33 +0000)
committerMichael Wallner <mike@php.net>
Wed, 24 Jan 2007 09:33:46 +0000 (09:33 +0000)
http_message_api.c

index 85b2b005bf1ebbc83c29a1854b65ee8fb3c3846c..5a64cc7e878e56ce42dd4984c2be2723a7045c34 100644 (file)
@@ -105,8 +105,8 @@ PHP_HTTP_API void _http_message_set_type(http_message *message, http_message_typ
 PHP_HTTP_API void _http_message_set_info(http_message *message, http_info *info)
 {
        message->http.version = info->http.version;
-       
-       switch (message->type = info->type) {
+       http_message_set_type(message, info->type);
+       switch (message->type) {
                case IS_HTTP_REQUEST:
                        HTTP_INFO(message).request.url = estrdup(HTTP_INFO(info).request.url);
                        STR_SET(HTTP_INFO(message).request.method, estrdup(HTTP_INFO(info).request.method));