]> git.baikalelectronics.ru Git - kernel.git/commit
sch_tbf: Fix potential memory leak in tbf_change().
authorHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Wed, 26 Feb 2014 12:43:42 +0000 (21:43 +0900)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2014 17:53:50 +0000 (12:53 -0500)
commitd62384b68e438570b082a52c2f9b374ad7185592
treead5545d23ed048dc2576eb8537446c3ccc421003
parenta059e6578f9c5506a78d550be323b5fdf80e2d8f
sch_tbf: Fix potential memory leak in tbf_change().

The allocated child qdisc is not freed in error conditions.
Defer the allocation after user configuration turns out to be
valid and acceptable.

Fixes: 79178f94512df ("net: sched: tbf: fix the calculation of max_size")
Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_tbf.c