From patchwork Sat Jan 29 21:47:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 779 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 701C2154631 for ; Sat, 29 Jan 2011 22:48:06 +0100 (CET) Received: from sven-desktop.home.narfation.org (unknown [88.130.181.181]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 4785F94057; Sat, 29 Jan 2011 22:48:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1296337719; bh=wLCrjnnKdKbN3mUjXr7ujwY643dRx1HAqbG/MOAOU+Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=R3zxBu3sM2zekzt7V+bsf5wVP/adWjkS1nuyzF7CR0Ti2UgGVl8v7Dmkyk7vvsA9D BR3uUsbtQ4jNxepqJH1CLwgBPHWJKwDMAwblCXNJny4+H6eKBMGngKo4j5G1X9BDkO +ALtouacXDpunO3MNFU4l8vxzGYeCLpEmDNWle58= From: Sven Eckelmann To: davem@davemloft.net Date: Sat, 29 Jan 2011 22:47:32 +0100 Message-Id: <1296337660-12376-6-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1296337660-12376-1-git-send-email-sven@narfation.org> References: <1296337660-12376-1-git-send-email-sven@narfation.org> Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org Subject: [B.A.T.M.A.N.] [PATCH 05/13] batman-adv: Remove vis info element in free_info X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list 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: , X-List-Received-Date: Sat, 29 Jan 2011 21:48:06 -0000 The free_info function will be called when no reference to the info object exists anymore. It must be ensured that the allocated memory gets freed and not only the elements which are managed by the info object. Signed-off-by: Sven Eckelmann --- net/batman-adv/vis.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 0be55be..988296c 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c @@ -64,6 +64,7 @@ static void free_info(struct kref *ref) spin_unlock_bh(&bat_priv->vis_list_lock); kfree_skb(info->skb_packet); + kfree(info); } /* Compare two vis packets, used by the hashing algorithm */