[2/2] batman-adv: skbs have to be freed using kfree_skb()

Message ID 1308177145-21191-2-git-send-email-ordex@autistici.org (mailing list archive)
State Accepted, archived
Commit 6f0ff747b7a61736eb40790eb4c279599d937672
Headers

Commit Message

Antonio Quartulli June 15, 2011, 10:32 p.m. UTC
  The skb structures have always to be freed using kfree_skb() and not the
simple kfree()

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 translation-table.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Marek Lindner June 16, 2011, 10:22 a.m. UTC | #1
On Thursday, June 16, 2011 12:32:25 AM Antonio Quartulli wrote:
> The skb structures have always to be freed using kfree_skb() and not the
> simple kfree()

Applied in revision 6f0ff74.

Thanks,
Marek
  

Patch

diff --git a/translation-table.c b/translation-table.c
index adecf1b..373ee81 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -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;
 }