cvs: pecl /http http_request_pool_api.c

From: Date: Tue, 14 Jun 2005 16:03:11 +0000
Subject: cvs: pecl /http http_request_pool_api.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-3284@lists.php.net to get a copy of this message
mike Tue Jun 14 12:03:11 2005 EDT Modified files: /pecl/http http_request_pool_api.c Log: - free handles http://cvs.php.net/diff.php/pecl/http/http_request_pool_api.c?r1=1.1&r2=1.2&ty=u Index: pecl/http/http_request_pool_api.c diff -u pecl/http/http_request_pool_api.c:1.1 pecl/http/http_request_pool_api.c:1.2 --- pecl/http/http_request_pool_api.c:1.1 Tue Jun 14 10:21:23 2005 +++ pecl/http/http_request_pool_api.c Tue Jun 14 12:03:10 2005 @@ -13,7 +13,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http_request_pool_api.c,v 1.1 2005/06/14 14:21:23 mike Exp $ */ +/* $Id: http_request_pool_api.c,v 1.2 2005/06/14 16:03:10 mike Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -135,7 +135,7 @@ fprintf(stderr, "Detaching %d requests from pool %p\n", count, pool); #endif /* - * we cannot apply a function to the llist which actually detaches + * we cannot apply a function to the llist which actually detaches * the curl handle *and* removes the llist element -- * so let's get our hands dirty */ @@ -143,13 +143,14 @@ int i = 0; zend_llist_position pos; zval **handle, **handles = emalloc(count * sizeof(zval *)); - + for (handle = zend_llist_get_first_ex(&pool->handles, &pos); handle; handle = zend_llist_get_next_ex(&pool->handles, &pos)) { handles[i++] = *handle; } for (i = 0; i < count; ++i) { http_request_pool_detach(pool, handles[i]); } + efree(handles); } }

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