From patchwork Sat Jan 29 21:47:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 763 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 5C6AC154630 for ; Sat, 29 Jan 2011 22:48:03 +0100 (CET) Received: from sven-desktop.home.narfation.org (unknown [88.130.181.181]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 2FADA94066; Sat, 29 Jan 2011 22:48:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1296337716; bh=EAokanws55n52NRl9/d0q35pYniF7I77eIVTNzJNtPo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Qz3fuBmyrPneSdskPXQdHDpx1RIQBtd/cNuRyun0bgwPFqwwZWs1/QcqWCh3B8GpC 5IiFSjK0Gt5uB/g4xhgfVe2nUW8/YVlsoJgXF/53PMBBwgr/GCwEp7xaQnedfDxqf4 uhYGtin8RkzViYzPkD+JCPV9cD2mY2v/jIn/zEyQ= From: Sven Eckelmann To: davem@davemloft.net Date: Sat, 29 Jan 2011 22:47:31 +0100 Message-Id: <1296337660-12376-5-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 04/13] batman-adv: Remove vis info on hashing errors 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:03 -0000 A newly created vis info object must be removed when it couldn't be added to the hash. The old_info which has to be replaced was already removed and isn't related to the hash anymore. Signed-off-by: Sven Eckelmann --- net/batman-adv/vis.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index f69a374..0be55be 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c @@ -444,7 +444,7 @@ static struct vis_info *add_packet(struct bat_priv *bat_priv, info); if (hash_added < 0) { /* did not work (for some reason) */ - kref_put(&old_info->refcount, free_info); + kref_put(&info->refcount, free_info); info = NULL; }