在ngx_dyups_do_update函数中,如果是走的upstream reuse逻辑,那么找到的ngx_http_dyups_srv_conf_t* duscf中的pool将是非空的。然后再调用ngx_dyups_init_upstream,该函数中没有对pool是否空做判断,直接做了create pool操作,会导致原来的pool未被释放?
static ngx_int_t ngx_dyups_init_upstream(ngx_http_dyups_srv_conf_t duscf, ngx_str_t name, ngx_uint_t index) { ... umcf = ngx_http_cycle_get_module_main_conf(ngx_cycle, ngx_http_upstream_module); uscfp = umcf->upstreams.elts;
duscf->pool = ngx_create_pool(512, ngx_cycle->log);
if (duscf->pool == NULL) {
return NGX_ERROR;
}
... }
- If applicable, add nginx debug log doc.