From: Michael Wallner Date: Tue, 16 Jun 2015 12:14:25 +0000 (+0200) Subject: fix leaks X-Git-Tag: RELEASE_3_0_0_RC1~41 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=5aa3a33fde0e9e59a7363d40cf4b446364f0623a;p=m6w6%2Fext-http fix leaks --- diff --git a/php_http_message.c b/php_http_message.c index de1f98f..d61644c 100644 --- a/php_http_message.c +++ b/php_http_message.c @@ -843,10 +843,16 @@ void php_http_message_object_free(zend_object *object) o->message = NULL; } if (o->parent) { + if (GC_REFCOUNT(&o->parent->zo) == 1) { + zend_objects_store_del(&o->parent->zo); + } zend_objects_store_del(&o->parent->zo); o->parent = NULL; } if (o->body) { + if (GC_REFCOUNT(&o->body->zo) == 1) { + zend_objects_store_del(&o->body->zo); + } zend_objects_store_del(&o->body->zo); o->body = NULL; } diff --git a/php_http_message_body.c b/php_http_message_body.c index 535c541..ab5b7ba 100644 --- a/php_http_message_body.c +++ b/php_http_message_body.c @@ -93,7 +93,7 @@ void php_http_message_body_free(php_http_message_body_t **body_ptr) php_http_message_body_t *body = *body_ptr; if (!--body->refcount) { - //zend_list_close(body->res); + zend_list_delete(body->res); PTR_FREE(body->boundary); efree(body); }