All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 3/3] alfred: Always initialize translation cache hash pointer
Date: Thu,  1 Jun 2017 08:26:32 +0200	[thread overview]
Message-ID: <20170601062632.4239-3-sven@narfation.org> (raw)
In-Reply-To: <20170601062632.4239-1-sven@narfation.org>

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 <sven@narfation.org>
---
 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 */
-- 
2.11.0


  parent reply	other threads:[~2017-06-01  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01  6:26 [B.A.T.M.A.N.] [PATCH 1/3] alfred: Check if tg hash was really initialized Sven Eckelmann
2017-06-01  6:26 ` [B.A.T.M.A.N.] [PATCH 2/3] alfred: Always initialize orig cache hash pointer Sven Eckelmann
2017-06-01  6:26 ` Sven Eckelmann [this message]
2017-06-01  8:15 ` [B.A.T.M.A.N.] [PATCH 1/3] alfred: Check if tg hash was really initialized Simon Wunderlich
2017-06-01  8:25   ` Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170601062632.4239-3-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.