From patchwork Thu Jun 1 06:26:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17029 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 2FC2881FE6; Thu, 1 Jun 2017 09:28:10 +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="IFFNxBWl"; dkim-atps=neutral Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 0753C80BA3 for ; Thu, 1 Jun 2017 08:26:39 +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 12A881100B4; Thu, 1 Jun 2017 08:26:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1496298398; bh=NiMgmTBy1/ByZ4mEbVr1ld46BFRAE0HiPrdz6WX1tDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IFFNxBWlxMBeEC5UG+tS2zi840YyvIbk3DZbxY+Qpgr/NOoTc2hZ/syuyO1U7tlnY /zTng/QTxgyt2T6F9sMbdGggZoHZnR+w81cA4HZRNaXpMQqI1aAv/H8ozIEqG8NZJn B0qmR6dKoQX/goMybJ4J4XD5G/Ek7+aQ5Z+8CjrM= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 1 Jun 2017 08:26:31 +0200 Message-Id: <20170601062632.4239-2-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 2/3] alfred: Always initialize orig 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 originator cache. Fixes: e50d18c39f92 ("alfred: Cache the TQ values for each originator") Signed-off-by: Sven Eckelmann --- server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.c b/server.c index 9774281..e7f691c 100644 --- a/server.c +++ b/server.c @@ -224,7 +224,7 @@ static void update_server_info(struct globals *globals) struct interface *interface; struct ether_addr *macaddr; struct hashtable_t *tg_hash; - struct hashtable_t *orig_hash; + struct hashtable_t *orig_hash = NULL; /* TQ is not used for master sync mode */ if (globals->opmode == OPMODE_MASTER)