comparison src/http/ngx_http_upstream.c @ 3514:58865853f29b

fix segfault: ngx_http_upstream_cleanup() cleans r->cleanup, the bug had been introduced in r3419
author Igor Sysoev <igor@sysoev.ru>
date Fri, 14 May 2010 09:22:58 +0000
parents a076e1823737
children 76d252724db5
comparison
equal deleted inserted replaced
3513:e60e00b4fe0c 3514:58865853f29b
363 u = r->upstream; 363 u = r->upstream;
364 364
365 if (u && u->cleanup) { 365 if (u && u->cleanup) {
366 r->main->count++; 366 r->main->count++;
367 ngx_http_upstream_cleanup(r); 367 ngx_http_upstream_cleanup(r);
368 *u->cleanup = NULL;
369 u->cleanup = NULL;
370 } 368 }
371 369
372 u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t)); 370 u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t));
373 if (u == NULL) { 371 if (u == NULL) {
374 return NGX_ERROR; 372 return NGX_ERROR;