mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUG/MEDIUM: stream: 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:
parent
b746329dc3
commit
2c1068cb67
1 changed files with 1 additions and 1 deletions
|
|
@ -934,7 +934,7 @@ static void sess_set_term_flags(struct stream *s)
|
|||
if (s->si[1].state < SI_ST_REQ) {
|
||||
|
||||
strm_fe(s)->fe_counters.failed_req++;
|
||||
if (strm_li(s)->counters)
|
||||
if (strm_li(s) && strm_li(s)->counters)
|
||||
strm_li(s)->counters->failed_req++;
|
||||
|
||||
s->flags |= SF_FINST_R;
|
||||
|
|
|
|||
Loading…
Reference in a new issue