Welcome! Log In Create A New Profile

Advanced

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

December 23, 2010 01:46AM
[img]http://blog.chinaunix.net/photo/6889_101223144343.jpg[/img]
I drawed a picture according to the code of the nginx-0.9.1. The top part in the picture is built in the ngx_http_block of ngx_http.c.

When the ngx_http_merge_servers function at line 277 is called, the ctx->srv_conf have hold the address of cf->ctx->srv_conf. After ctx->srv_conf = cscfp[s]->ctx->srv_conf, ctx->srv_conf discard it's older address to point to the new address cscfp[s]->ctx->srv_conf.

So I think it will generate memory leak.
Subject Author Posted

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

eagle sbc December 22, 2010 10:54PM

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

garry.lgr December 23, 2010 01:46AM

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

Igor Sysoev December 23, 2010 02:16AM

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

garry.lgr December 23, 2010 02:51AM

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

Igor Sysoev December 23, 2010 03:50AM

Re: what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf

garry.lgr December 23, 2010 05:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 222
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready