[NET]: Fix kfree(skb)

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy 2007-02-27 09:57:37 -08:00 committed by David S. Miller
parent 4498121ca3
commit b08d5840d2
4 changed files with 4 additions and 4 deletions

View File

@ -2037,7 +2037,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
err: err:
while ((skb = segs)) { while ((skb = segs)) {
segs = skb->next; segs = skb->next;
kfree(skb); kfree_skb(skb);
} }
return ERR_PTR(err); return ERR_PTR(err);
} }

View File

@ -269,7 +269,7 @@ void dccp_write_xmit(struct sock *sk, int block)
err); err);
} else { } else {
dccp_pr_debug("packet discarded\n"); dccp_pr_debug("packet discarded\n");
kfree(skb); kfree_skb(skb);
} }
} }
} }

View File

@ -173,7 +173,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info)
return 0; return 0;
list_failure: list_failure:
kfree(ans_skb); kfree_skb(ans_skb);
return ret_val; return ret_val;
} }

View File

@ -1401,7 +1401,7 @@ static int xfrm_get_ae(struct sk_buff *skb, struct nlmsghdr *nlh,
x = xfrm_state_lookup(&id->daddr, id->spi, id->proto, id->family); x = xfrm_state_lookup(&id->daddr, id->spi, id->proto, id->family);
if (x == NULL) { if (x == NULL) {
kfree(r_skb); kfree_skb(r_skb);
return -ESRCH; return -ESRCH;
} }