Yunjian Wang ae81feb733 sch_htb: fix null pointer dereference on a null new_q
sch_htb: fix null pointer dereference on a null new_q

Currently if new_q is null, the null new_q pointer will be
dereference when 'q->offload' is true. Fix this by adding
a braces around htb_parent_to_leaf_offload() to avoid it.

Addresses-Coverity: ("Dereference after null check")
Fixes: d03b195b5aa0 ("sch_htb: Hierarchical QoS hardware offload")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-03-30 13:50:03 -07:00
..
2020-07-13 17:20:40 -07:00
2020-07-13 17:20:40 -07:00
2021-03-10 15:47:52 -08:00
2021-03-10 15:47:52 -08:00
2021-03-10 15:47:52 -08:00
2021-03-10 15:47:52 -08:00