From patchwork Fri Jan 28 17:34:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 718 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 17A671545A1 for ; Fri, 28 Jan 2011 18:34:10 +0100 (CET) Received: from sven-desktop.home.narfation.org (i59F6BEB3.versanet.de [89.246.190.179]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id BE3E594061; Fri, 28 Jan 2011 18:34:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1296236083; bh=ZLSMUTzr73DCkHcZ3BhM4LP+r0px2GfMp+vz4oKx96Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=rVGw42sX+D9iz4KIiqUHr8gBT8uXtARgMtUr0g0GsiJD3sbviKS+zTrQtAgLD1Hkv XgD1djT8jGWWjbG1LchEe0oBaxYad70FG/nQ/tfre7dYgSD0yPlHK3qgGeQIErbfBW bgzyxIkoA7IzTQBENbWfPL6X2kxyE5QwUS1DOf3c= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 28 Jan 2011 18:34:06 +0100 Message-Id: <1296236047-15200-2-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1296236047-15200-1-git-send-email-sven@narfation.org> References: <1296236047-15200-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 2/3] 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: Fri, 28 Jan 2011 17:34:11 -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 --- batman-adv/vis.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/batman-adv/vis.c b/batman-adv/vis.c index 9d2729c..584781e 100644 --- a/batman-adv/vis.c +++ b/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 */