From: Michael Wallner Date: Wed, 24 Jan 2007 09:33:46 +0000 (+0000) Subject: - fix possible leaks when changing message type X-Git-Tag: RELEASE_1_4_1~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6c365f33222d73c802287f343eff259a72119894;p=m6w6%2Fext-http - fix possible leaks when changing message type --- 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));