summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2014-01-22 04:58:19 +0400
committerValentin Bartenev <vbart@nginx.com>2014-01-22 04:58:19 +0400
commit6b949b3920b0ca0aa2a4e736927a562c13a04376 (patch)
tree440a037f22527b4a23af65f965e7bbbe27fcfaac
parentddc22dcb9ca303b0285de6b49a5f2b6576bd6951 (diff)
downloadnginx-6b949b3920b0ca0aa2a4e736927a562c13a04376.tar.gz
nginx-6b949b3920b0ca0aa2a4e736927a562c13a04376.tar.bz2
SPDY: fixed possible segfault.
While processing a DATA frame, the link to related stream is stored in spdy connection object as part of connection state. But this stream can be closed between receiving parts of the frame.
Diffstat (limited to '')
-rw-r--r--src/http/ngx_http_spdy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c
index 7c93dc49a..f4f610a82 100644
--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -2626,6 +2626,10 @@ ngx_http_spdy_close_stream(ngx_http_spdy_stream_t *stream, ngx_int_t rc)
}
}
+ if (sc->stream == stream) {
+ sc->stream = NULL;
+ }
+
sscf = ngx_http_get_module_srv_conf(sc->http_connection->conf_ctx,
ngx_http_spdy_module);