comparison src/http/ngx_http_spdy.c @ 5686:5cf537731218

SPDY: fixed one case of improper memory allocation error handling. Now ngx_http_spdy_construct_request_line() doesn't try to finalize request in case of failed memory allocation.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 30 Apr 2014 02:16:21 +0400
parents 46d0795a846c
children 6642690698f1
comparison
equal deleted inserted replaced
5685:0cbefdcf82a6 5686:5cf537731218
2898 + r->unparsed_uri.len + 1 2898 + r->unparsed_uri.len + 1
2899 + r->http_protocol.len; 2899 + r->http_protocol.len;
2900 2900
2901 p = ngx_pnalloc(r->pool, r->request_line.len + 1); 2901 p = ngx_pnalloc(r->pool, r->request_line.len + 1);
2902 if (p == NULL) { 2902 if (p == NULL) {
2903 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 2903 ngx_http_spdy_close_stream(r->spdy_stream,
2904 NGX_HTTP_INTERNAL_SERVER_ERROR);
2904 return NGX_ERROR; 2905 return NGX_ERROR;
2905 } 2906 }
2906 2907
2907 r->request_line.data = p; 2908 r->request_line.data = p;
2908 2909