From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Antonio Quartulli Date: Tue, 14 Jun 2011 18:01:39 +0200 Message-Id: <1308067299-2282-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: skbs have to be freed using kfree_skb() Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "B.A.T.M.A.N" The skb structures have always to be freed using kfree_skb() and not the simple kfree() Signed-off-by: Antonio Quartulli --- routing.c | 2 +- translation-table.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routing.c b/routing.c index 30d0f73..41d065e 100644 --- a/routing.c +++ b/routing.c @@ -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; } 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; } -- 1.7.3.4