From: Michael Wallner Date: Mon, 4 Dec 2006 17:13:46 +0000 (+0000) Subject: - fix SEGV when there's an exception in HttpRequest::onFinish() X-Git-Tag: RELEASE_1_4_0RC1~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3bf69148ad8af8fb5f5ab155f8cf8b76b82f2956;p=m6w6%2Fext-http - fix SEGV when there's an exception in HttpRequest::onFinish() --- diff --git a/http_request_object.c b/http_request_object.c index 3fbfdbf..319cb4f 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -721,6 +721,8 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this ret = FAILURE; } + http_request_set_progress_callback(obj->request, NULL); + if (!EG(exception) && zend_hash_exists(&Z_OBJCE_P(getThis())->function_table, "onfinish", sizeof("onfinish"))) { zval *param; @@ -732,8 +734,6 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this zval_ptr_dtor(¶m); } - http_request_set_progress_callback(obj->request, NULL); - return ret; }