summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_choke.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-05-07 07:10:13 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-07 07:10:13 +0200
commit3793faad7b5b730941b2efbc252d14374b60843a (patch)
treee1bea43727d87f8fd30ca169f465a3591f15d63b /net/sched/sch_choke.c
parentdsa: sja1105: dynamically allocate stats structure (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadlinux-3793faad7b5b730941b2efbc252d14374b60843a.tar.xz
linux-3793faad7b5b730941b2efbc252d14374b60843a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts were all overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_choke.c')
-rw-r--r--net/sched/sch_choke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 59ff466ec7cb..bd618b00d319 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -317,7 +317,8 @@ static void choke_reset(struct Qdisc *sch)
sch->q.qlen = 0;
sch->qstats.backlog = 0;
- memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *));
+ if (q->tab)
+ memset(q->tab, 0, (q->tab_mask + 1) * sizeof(struct sk_buff *));
q->head = q->tail = 0;
red_restart(&q->vars);
}