Check return value of malloc (#64)

Introduced in recent PR (2d296031db)
This commit is contained in:
Dmitri Tikhonov 2019-02-01 15:12:02 -05:00 committed by LiteSpeed Tech
parent 9711bfba43
commit 5d081270b9

View file

@ -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)