mirror of https://gitee.com/openkylin/linux.git
sch_atm: Fix potential NULL deref.
The list_head conversion unearther an unnecessary flow check. Since flow is always NULL here we don't need to see if a matching flow exists already. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
053d8f6622
commit
a505b3b30f
|
@ -255,10 +255,6 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
|
|||
error = -EINVAL;
|
||||
goto err_out;
|
||||
}
|
||||
if (!list_empty(&flow->list)) {
|
||||
error = -EEXIST;
|
||||
goto err_out;
|
||||
}
|
||||
} else {
|
||||
int i;
|
||||
unsigned long cl;
|
||||
|
|
Loading…
Reference in New Issue