From: Michael Wallner Date: Mon, 11 Apr 2005 10:12:26 +0000 (+0000) Subject: - check for success X-Git-Tag: RELEASE_0_8_0~87 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=46ef6bdcdea32310a17dc95eadb14936125dcb51;p=m6w6%2Fext-http - check for success --- diff --git a/http_message_api.c b/http_message_api.c index 0dec409..a4490d8 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -66,7 +66,10 @@ PHP_HTTP_API http_message *_http_message_parse_ex(char *message, size_t message_ header_length = message_length; } - http_parse_headers_cb(message, header_length, &msg->hdrs, 1, http_message_parse_headers_callback, (void **) &msg); + if (SUCCESS != http_parse_headers_cb(message, header_length, &msg->hdrs, 1, http_message_parse_headers_callback, (void **) &msg)) { + http_message_free(msg); + return NULL; + } if (body) { phpstr_from_string_ex(PHPSTR(msg), body, message_length - header_length);