what's the meaning ? ctx->srv conf = cscfp[s]->ctx->srv conf
nginx-forum at nginx.us
Thu Dec 23 09:46:15 MSK 2010
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.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,160635,160645#msg-160645
More information about the nginx