[NETLINK]: Use nlmsg_trim() where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a36ca73337
commit
dc5fc579b9
@@ -27,6 +27,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <net/netlink.h>
|
||||
#include <net/sock.h>
|
||||
#include <net/pkt_sched.h>
|
||||
#include <linux/tc_act/tc_pedit.h>
|
||||
@@ -226,7 +227,7 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,
|
||||
return skb->len;
|
||||
|
||||
rtattr_failure:
|
||||
skb_trim(skb, b - skb->data);
|
||||
nlmsg_trim(skb, b);
|
||||
kfree(opt);
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user