net: sched: sch_taprio: fix memleak in error path for sched list parse
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Tue, 6 Aug 2019 22:45:40 +0000 (01:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Aug 2019 05:00:24 +0000 (22:00 -0700)
commit51650d33b2771acd505068da669cf85cffac369a
treef974e43343186b5e7e39f066a56ac81ef3fa6f5d
parentfe90689fed119cb55ff04e6a1df0817f0a3e9d32
net: sched: sch_taprio: fix memleak in error path for sched list parse

In error case, all entries should be freed from the sched list
before deleting it. For simplicity use rcu way.

Fixes: 5a781ccbd19e46 ("tc: Add support for configuring the taprio scheduler")
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_taprio.c