From 4d054f2f1445aceedab3f9642692d55d2caa7ec6 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 23 Jun 2011 03:14:42 -0700 Subject: [PATCH] dcb: use nlmsg_free() instead of kfree() These sk_buff structs were allocated with nlmsg_new() so they should be freed with nlmsg_free(). Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- net/dcb/dcbnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index e954d4c6590c..fc56e8546261 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1329,7 +1329,7 @@ int dcbnl_notify(struct net_device *dev, int event, int cmd, nlh = nlmsg_put(skb, pid, 0, event, sizeof(*dcb), 0); if (nlh == NULL) { - kfree(skb); + nlmsg_free(skb); return -EMSGSIZE; } @@ -1434,7 +1434,7 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb, nlh = nlmsg_put(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags); if (nlh == NULL) { - kfree(skb); + nlmsg_free(skb); return -EMSGSIZE; } -- 2.30.2