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>
nlh = nlmsg_put(skb, pid, 0, event, sizeof(*dcb), 0);
if (nlh == NULL) {
- kfree(skb);
+ nlmsg_free(skb);
return -EMSGSIZE;
}
nlh = nlmsg_put(skb, pid, seq, RTM_GETDCB, sizeof(*dcb), flags);
if (nlh == NULL) {
- kfree(skb);
+ nlmsg_free(skb);
return -EMSGSIZE;
}