batman-adv: skbs have to be freed using kfree_skb()
Commit Message
The skb structures have always to be freed using kfree_skb() and not the
simple kfree()
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
routing.c | 2 +-
translation-table.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Comments
On Tuesday, June 14, 2011 06:01:39 PM Antonio Quartulli wrote:
> @@ -1299,7 +1299,7 @@ int recv_roam_adv(struct sk_buff *skb, struct
> hard_iface *recv_if) orig_node_free_ref(orig_node);
> ret = NET_RX_SUCCESS;
> out:
> - kfree(skb);
> + kfree_skb(skb);
> return ret;
> }
>
I'd say recv_roam_adv() suffers from the same problem you fixed in
recv_tt_query() with your previous patch. Wouldn't you say so ?
Cheers,
Marek
@@ -1299,7 +1299,7 @@ int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if)
orig_node_free_ref(orig_node);
ret = NET_RX_SUCCESS;
out:
- kfree(skb);
+ kfree_skb(skb);
return ret;
}
@@ -1199,7 +1199,7 @@ out:
if (primary_if)
hardif_free_ref(primary_if);
if (!ret)
- kfree(skb);
+ kfree_skb(skb);
return ret;
}
@@ -1312,7 +1312,7 @@ out:
if (primary_if)
hardif_free_ref(primary_if);
if (!ret)
- kfree(skb);
+ kfree_skb(skb);
/* This packet was for me, so it doesn't need to be re-routed */
return true;
}