mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUG/MINOR: quic: fix crash on quic_conn alloc failure
If there is an alloc failure during qc_new_conn(), cleaning is done via
quic_conn_release(). However, since the below commit, an unchecked
dereferencing of <qc.path> is performed in the latter.
e841164a44
MINOR: quic: account for global congestion window
To fix this, simply check <qc.path> before dereferencing it in
quic_conn_release(). This is safe as it is properly initialized to NULL
on qc_new_conn() first stage.
This does not need to be backported.
This commit is contained in:
parent
099c1b2442
commit
d358da4d83
@ -1448,8 +1448,10 @@ int quic_conn_release(struct quic_conn *qc)
|
||||
}
|
||||
|
||||
/* Substract last congestion window from global memory counter. */
|
||||
if (qc->path) {
|
||||
cshared_add(&quic_mem_diff, -qc->path->cwnd);
|
||||
qc->path->cwnd = 0;
|
||||
}
|
||||
|
||||
/* free remaining stream descriptors */
|
||||
node = eb64_first(&qc->streams_by_id);
|
||||
|
Loading…
Reference in New Issue
Block a user