Skip to content

Commit

Permalink
DCB: fix kfree(skb)
Browse files Browse the repository at this point in the history
Use kfree_skb instead of kfree for struct sk_buff pointers.

Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
RoelKluin authored and davem330 committed Jan 5, 2009
1 parent 914d116 commit 858eb71
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions net/dcb/dcbnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int dcbnl_reply(u8 value, u8 event, u8 cmd, u8 attr, u32 pid,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
return ret;
}

Expand Down Expand Up @@ -272,7 +272,7 @@ static int dcbnl_getpfccfg(struct net_device *netdev, struct nlattr **tb,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return -EINVAL;
}
Expand Down Expand Up @@ -314,7 +314,7 @@ static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlattr **tb,

nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return -EINVAL;
}
Expand Down Expand Up @@ -380,7 +380,7 @@ static int dcbnl_getcap(struct net_device *netdev, struct nlattr **tb,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return -EINVAL;
}
Expand Down Expand Up @@ -458,7 +458,7 @@ static int dcbnl_getnumtcs(struct net_device *netdev, struct nlattr **tb,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return ret;
}
Expand Down Expand Up @@ -687,7 +687,7 @@ static int __dcbnl_pg_getcfg(struct net_device *netdev, struct nlattr **tb,
nla_nest_cancel(dcbnl_skb, pg_nest);
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
ret = -EINVAL;
return ret;
Expand Down Expand Up @@ -949,7 +949,7 @@ static int dcbnl_bcn_getcfg(struct net_device *netdev, struct nlattr **tb,
nla_nest_cancel(dcbnl_skb, bcn_nest);
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
ret = -EINVAL;
return ret;
Expand Down

0 comments on commit 858eb71

Please sign in to comment.