From patchwork Thu Jun 1 06:26:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17030 Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id D7B6781FED; Thu, 1 Jun 2017 09:28:17 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="BTA9MlD8"; dkim-atps=neutral Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id D597D80BA3 for ; Thu, 1 Jun 2017 08:26:40 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p2003007C6F608AFE527B9DFFFECE2683.dip0.t-ipconnect.de [IPv6:2003:7c:6f60:8afe:527b:9dff:fece:2683]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 31AF51100B4; Thu, 1 Jun 2017 08:26:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1496298400; bh=YQYgxqcx3i03nodM7g+sE4hKGb0eUSI694NZlwKfrfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BTA9MlD8KE7at7Q67Ma+FlMCUzxEwyGFcI2GIdNYOvYZCo31Zg8BXlEm8uvwnsnFG dnTfOf++A1IUcUd+7abCtxBkeifsQlVmUEwpRD6AbnNZHfSQmi8sheMncUlG73XN+5 dUZ4Fz/jTurg2KY6aH4ARn/OSiuze7flyHIuCQkY= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 1 Jun 2017 08:26:32 +0200 Message-Id: <20170601062632.4239-3-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170601062632.4239-1-sven@narfation.org> References: <20170601062632.4239-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 3/3] alfred: Always initialize translation cache hash pointer X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The initialization of the cache can be disabled when mesh interface is "none". We must therefore make sure that the remaining code is not accessing the uninitialized pointer to the translation cache. Fixes: a7bc3d9a2b3f ("alfred: Cache the global translation table entries") Signed-off-by: Sven Eckelmann --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index e7f691c..b6f0812 100644 --- a/server.c +++ b/server.c @@ -223,7 +223,7 @@ static void update_server_info(struct globals *globals) struct hash_it_t *hashit = NULL; struct interface *interface; struct ether_addr *macaddr; - struct hashtable_t *tg_hash; + struct hashtable_t *tg_hash = NULL; struct hashtable_t *orig_hash = NULL; /* TQ is not used for master sync mode */