]> git.kaiwu.me - nginx.git/commitdiff
SPDY: fixed one case of improper memory allocation error handling.
authorValentin Bartenev <vbart@nginx.com>
Tue, 29 Apr 2014 22:16:21 +0000 (02:16 +0400)
committerValentin Bartenev <vbart@nginx.com>
Tue, 29 Apr 2014 22:16:21 +0000 (02:16 +0400)
Now ngx_http_spdy_construct_request_line() doesn't try to finalize request
in case of failed memory allocation.

src/http/ngx_http_spdy.c

index a09e4ac0bdf9aee2fbb22a317fd76c1c809893ef..059adc977ca1258ef9c3af177597148262a3a7d0 100644 (file)
@@ -2900,7 +2900,8 @@ ngx_http_spdy_construct_request_line(ngx_http_request_t *r)
 
     p = ngx_pnalloc(r->pool, r->request_line.len + 1);
     if (p == NULL) {
-        ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+        ngx_http_spdy_close_stream(r->spdy_stream,
+                                   NGX_HTTP_INTERNAL_SERVER_ERROR);
         return NGX_ERROR;
     }