cvs: pecl /http http_request_object.c

From: Date: Mon, 13 Jun 2005 17:02:13 +0000
Subject: cvs: pecl /http http_request_object.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-3274@lists.php.net to get a copy of this message
mike Mon Jun 13 13:02:13 2005 EDT Modified files: /pecl/http http_request_object.c Log: - yet better a memleak than a segfault http://cvs.php.net/diff.php/pecl/http/http_request_object.c?r1=1.12&r2=1.13&ty=u Index: pecl/http/http_request_object.c diff -u pecl/http/http_request_object.c:1.12 pecl/http/http_request_object.c:1.13 --- pecl/http/http_request_object.c:1.12 Mon Jun 13 12:48:05 2005 +++ pecl/http/http_request_object.c Mon Jun 13 13:02:12 2005 @@ -13,7 +13,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http_request_object.c,v 1.12 2005/06/13 16:48:05 mike Exp $ */ +/* $Id: http_request_object.c,v 1.13 2005/06/13 17:02:12 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 = GET_PROP(obj, responseMessage), *resp = GET_PROP(obj, responseData), *info = GET_PROP(obj, responseInfo); + zval *headers, *message, *resp = GET_PROP(obj, responseData), *info = GET_PROP(obj, responseInfo); UPD_PROP(obj, long, responseCode, msg->info.response.code); @@ -314,6 +314,8 @@ add_assoc_zval(resp, "headers", headers); add_assoc_stringl(resp, "body", body, body_len, 0); + /* XXX */ + MAKE_STD_ZVAL(message); Z_TYPE_P(message) = IS_OBJECT; message->value.obj = http_message_object_from_msg(msg); SET_PROP(obj, responseMessage, message);

« previous php.pecl.cvs (#3274) next »