diff options
author | Dan Carpenter <error27@gmail.com> | 2011-06-23 06:14:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-23 06:14:42 -0400 |
commit | 4d054f2f1445aceedab3f9642692d55d2caa7ec6 (patch) | |
tree | 23ebf4a95548c58ca5d5a00045b5f9e74fbc2df8 /net | |
parent | 655f8919d549ad1872e24d826b6ce42530516d2e (diff) |
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 <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/dcb/dcbnl.c | 4 |
1 files 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, | |||
1329 | 1329 | ||
1330 | nlh = nlmsg_put(skb, pid, 0, event, sizeof(*dcb), 0); | 1330 | nlh = nlmsg_put(skb, pid, 0, event, sizeof(*dcb), 0); |
1331 | if (nlh == NULL) { | 1331 | if (nlh == NULL) { |
1332 | kfree(skb); | 1332 | nlmsg_free(skb); |
1333 | return -EMSGSIZE; | 1333 | return -EMSGSIZE; |
1334 | } | 1334 | } |
1335 | 1335 | ||
@@ -1434,7 +1434,7 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb, | |||
1434 | 1434 | ||
1435 | nlh = nlmsg_put(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags); | 1435 | nlh = nlmsg_put(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags); |
1436 | if (nlh == NULL) { | 1436 | if (nlh == NULL) { |
1437 | kfree(skb); | 1437 | nlmsg_free(skb); |
1438 | return -EMSGSIZE; | 1438 | return -EMSGSIZE; |
1439 | } | 1439 | } |
1440 | 1440 | ||