]> git.hungrycats.org Git - linux/commitdiff
sch_sfb: Fix missing NULL check
authorAlan Cox <alan@linux.intel.com>
Thu, 12 Jul 2012 03:39:11 +0000 (03:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:31:42 +0000 (08:31 -0700)
[ Upstream commit 7ac2908e4b2edaec60e9090ddb4d9ceb76c05e7d ]

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44461

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/sch_sfb.c

index d7eea99333e96a33a953106a3a0f2fdb32a12385..c6a5867d35c4e170de2a3a3c72aa3ba1cbdea494 100644 (file)
@@ -570,6 +570,8 @@ static int sfb_dump(struct Qdisc *sch, struct sk_buff *skb)
 
        sch->qstats.backlog = q->qdisc->qstats.backlog;
        opts = nla_nest_start(skb, TCA_OPTIONS);
+       if (opts == NULL)
+               goto nla_put_failure;
        NLA_PUT(skb, TCA_SFB_PARMS, sizeof(opt), &opt);
        return nla_nest_end(skb, opts);