diff options
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 3cbc3ff7b5bc..f840d6b27c65 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -331,10 +331,9 @@ static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr) | |||
331 | root_lock = qdisc_root_sleeping_lock(sch); | 331 | root_lock = qdisc_root_sleeping_lock(sch); |
332 | 332 | ||
333 | spin_lock_bh(root_lock); | 333 | spin_lock_bh(root_lock); |
334 | d = xchg(&q->delay_dist, d); | 334 | kfree(q->delay_dist); |
335 | q->delay_dist = d; | ||
335 | spin_unlock_bh(root_lock); | 336 | spin_unlock_bh(root_lock); |
336 | |||
337 | kfree(d); | ||
338 | return 0; | 337 | return 0; |
339 | } | 338 | } |
340 | 339 | ||