mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Check return value of malloc (#64)
Introduced in recent PR (2d296031db
)
This commit is contained in:
parent
9711bfba43
commit
5d081270b9
1 changed files with 5 additions and 0 deletions
|
@ -2498,6 +2498,11 @@ create_delayed_streams (struct full_conn *conn)
|
|||
avail = conn->fc_n_delayed_streams;
|
||||
|
||||
new_streams = malloc(sizeof(new_streams[0]) * avail);
|
||||
if (!new_streams)
|
||||
{
|
||||
ABORT_WARN("%s: malloc failed", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
LSQ_DEBUG("creating delayed streams");
|
||||
for (i = 0; i < avail; ++i)
|
||||
|
|
Loading…
Reference in a new issue