net/ncsi: use kfree_skb() instead of kfree()

We're supposed to use kfree_skb() to free these sk_buffs.

Fixes: 955dc68cb9 ("net/ncsi: Add generic netlink family")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2018-03-08 12:36:04 +03:00 committed by David S. Miller
parent cecd8d81ac
commit 50db64b090
1 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ static int ncsi_pkg_info_nl(struct sk_buff *msg, struct genl_info *info)
hdr = genlmsg_put(skb, info->snd_portid, info->snd_seq,
&ncsi_genl_family, 0, NCSI_CMD_PKG_INFO);
if (!hdr) {
kfree(skb);
kfree_skb(skb);
return -EMSGSIZE;
}
@ -204,7 +204,7 @@ static int ncsi_pkg_info_nl(struct sk_buff *msg, struct genl_info *info)
err:
genlmsg_cancel(skb, hdr);
kfree(skb);
kfree_skb(skb);
return rc;
}