cvs: pecl /http http_request_object.c
| From: | Michael Wallner | Date: | Mon, 13 Jun 2005 16:48:06 +0000 |
| Subject: | cvs: pecl /http http_request_object.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-3273@lists.php.net to get a copy of this message | ||
mike Mon Jun 13 12:48:06 2005 EDT
Modified files:
/pecl/http http_request_object.c
Log:
- fix memleak
http://cvs.php.net/diff.php/pecl/http/http_request_object.c?r1=1.11&r2=1.12&ty=u
Index: pecl/http/http_request_object.c
diff -u pecl/http/http_request_object.c:1.11 pecl/http/http_request_object.c:1.12
--- pecl/http/http_request_object.c:1.11 Mon Jun 13 11:24:45 2005
+++ pecl/http/http_request_object.c Mon Jun 13 12:48:05 2005
@@ -13,7 +13,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: http_request_object.c,v 1.11 2005/06/13 15:24:45 mike Exp $ */
+/* $Id: http_request_object.c,v 1.12 2005/06/13 16:48:05 mike Exp $ */
#ifdef HAVE_CONFIG_H
@@ -301,7 +301,7 @@
if (msg = http_message_parse(PHPSTR_VAL(&obj->response),
PHPSTR_LEN(&obj->response))) {
char *body;
size_t body_len;
- zval *headers, *message, *resp = GET_PROP(obj, responseData), *info = GET_PROP(obj,
responseInfo);
+ zval *headers, *message = GET_PROP(obj, responseMessage), *resp = GET_PROP(obj, responseData),
*info = GET_PROP(obj, responseInfo);
UPD_PROP(obj, long, responseCode, msg->info.response.code);
@@ -314,7 +314,6 @@
add_assoc_zval(resp, "headers", headers);
add_assoc_stringl(resp, "body", body, body_len, 0);
- MAKE_STD_ZVAL(message);
Z_TYPE_P(message) = IS_OBJECT;
message->value.obj = http_message_object_from_msg(msg);
SET_PROP(obj, responseMessage, message);