BUG/MEDIUM: http: do not dereference strm_li(stream)

Some streams do not have a listener (eg: Lua's cosockets) so
let's check for this. For now this problem cannot happen but
it's definitely unsafe.
This commit is contained in:
Willy Tarreau 2015-09-23 12:18:14 +02:00
parent f1e0212d54
commit c29d0cda4b

View File

@ -5284,7 +5284,7 @@ void http_end_txn_clean_session(struct stream *s)
si_idle_conn(&s->si[1], &srv->idle_conns);
}
s->req.analysers = strm_li(s)->analysers;
s->req.analysers = strm_li(s) ? strm_li(s)->analysers : 0;
s->res.analysers = 0;
}