From 6c365f33222d73c802287f343eff259a72119894 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 24 Jan 2007 09:33:46 +0000 Subject: [PATCH] - fix possible leaks when changing message type --- http_message_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http_message_api.c b/http_message_api.c index 85b2b00..5a64cc7 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -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)); -- 2.30.2