From patchwork Fri Jan 28 17:34:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 730 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 36BF0154541 for ; Fri, 28 Jan 2011 18:34:09 +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 23F3E94061; Fri, 28 Jan 2011 18:34:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1296236080; bh=CASSMWw1oHKrp/Pu7wZERe443TgGY925/UyGI+IHKTQ=; h=From:To:Cc:Subject:Date:Message-Id; b=XaEU03DhXSrfdVTxNJ++UgA0/zrpTToq8os/beZP8YBE+b/tXXGElpScFKGzCslZK yVgVUitkjiNqIxpbBuZSlfH/s1LB/eVZ3MOfdGlYOL+z3utLq1EV74n1Q/LQm27ID9 ZsQL4sdRhMvgEIekN7QYyf4y1KBGpGxRpwKOm+Nc= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 28 Jan 2011 18:34:05 +0100 Message-Id: <1296236047-15200-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.2.3 Subject: [B.A.T.M.A.N.] [PATCH 1/3] 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: Fri, 28 Jan 2011 17:34:09 -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 --- batman-adv/vis.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/batman-adv/vis.c b/batman-adv/vis.c index 2cdf01c..9d2729c 100644 --- a/batman-adv/vis.c +++ b/batman-adv/vis.c @@ -446,7 +446,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; }