X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fsched%2Fcls_basic.c;h=590960a22a77fb0747c2fc42c78caff686cd8ac8;hb=e87cc4728f0e2fb663e592a1141742b1d6c63256;hp=ea1f70b5a5f4747f2988c0b354a0abac7f2443da;hpb=3210d190dcb717c328d74f8c3f69ec717d665b40;p=~andy%2Flinux diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index ea1f70b5a5f..590960a22a7 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c @@ -257,8 +257,9 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh, if (nest == NULL) goto nla_put_failure; - if (f->res.classid) - NLA_PUT_U32(skb, TCA_BASIC_CLASSID, f->res.classid); + if (f->res.classid && + nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid)) + goto nla_put_failure; if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 || tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0)