Franchoze Eric
October 11, 2010 05:46PM
Is free() needed here?

ngx_pool_cleanup_t *
ngx_pool_cleanup_add(ngx_pool_t *p, size_t size)
{
ngx_pool_cleanup_t *c;

c = ngx_palloc(p, sizeof(ngx_pool_cleanup_t));
if (c == NULL) {
return NULL;
}

if (size) {
c->data = ngx_palloc(p, size);
!!! do we need nginx_free(p); here?!!!!

if (c->data == NULL) {
return NULL;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

memory leak at ngx_pool_cleanup_add ?

Franchoze Eric 3225 October 11, 2010 05:46PM

Re: memory leak at ngx_pool_cleanup_add ?

Maxim Dounin 1270 October 11, 2010 06:24PM

Re: memory leak at ngx_pool_cleanup_add ?

Franchoze Eric 1150 October 12, 2010 01:00PM

Re: memory leak at ngx_pool_cleanup_add ?

Maxim Dounin 1289 October 12, 2010 01:18PM

ngx_rewrite_set()

Eugaia 1497 October 12, 2010 08:16PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 121
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready