mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
* Using the reslist pool for the proxy_conn_rec structure introduces a memory
leak when connections get created and destroyed frequently by the reslist (e.g. destroying idle elements of the reslist). So use the subpool dedicated for the proxy_conn_rec structure to allocate the memory for the structure itself. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@605838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1655,7 +1655,7 @@ static apr_status_t connection_cleanup(void *theconn)
|
||||
if (conn->close || !worker->is_address_reusable) {
|
||||
apr_pool_t *p = conn->pool;
|
||||
apr_pool_clear(p);
|
||||
memset(conn, 0, sizeof(proxy_conn_rec));
|
||||
conn = apr_pcalloc(p, sizeof(proxy_conn_rec));
|
||||
conn->pool = p;
|
||||
conn->worker = worker;
|
||||
apr_pool_create(&(conn->scpool), p);
|
||||
@@ -1743,7 +1743,7 @@ static apr_status_t connection_constructor(void **resource, void *params,
|
||||
*/
|
||||
apr_pool_create(&scpool, ctx);
|
||||
apr_pool_tag(scpool, "proxy_conn_scpool");
|
||||
conn = apr_pcalloc(pool, sizeof(proxy_conn_rec));
|
||||
conn = apr_pcalloc(ctx, sizeof(proxy_conn_rec));
|
||||
|
||||
conn->pool = ctx;
|
||||
conn->scpool = scpool;
|
||||
|
Reference in New Issue
Block a user