]> git.baikalelectronics.ru Git - kernel.git/commit
sch_fq_codel: avoid double free on init failure
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Wed, 30 Aug 2017 09:49:02 +0000 (12:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Aug 2017 22:26:11 +0000 (15:26 -0700)
commit971b46decbb8b945fcf98bd5762e3468dd362f9d
treed8f6e8f11ab3ec40b0e0a43575429f0dc8695e3c
parentac71cb75e4eb0ae71d31a22210e8f82de7484ed0
sch_fq_codel: avoid double free on init failure

It is very unlikely to happen but the backlogs memory allocation
could fail and will free q->flows, but then ->destroy() will free
q->flows too. For correctness remove the first free and let ->destroy
clean up.

Fixes: 28eb97a9988e ("net_sched: fix error recovery at qdisc creation")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_fq_codel.c