Skip to content
Commit ae81feb7 authored by Yunjian Wang's avatar Yunjian Wang Committed by David S. Miller
Browse files

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: d03b195b

 ("sch_htb: Hierarchical QoS hardware offload")

Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8a03dd92
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment