public inbox for b.a.t.m.a.n@lists.open-mesh.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 2/3] alfred: Always initialize orig cache hash pointer
Date: Thu,  1 Jun 2017 08:26:31 +0200	[thread overview]
Message-ID: <20170601062632.4239-2-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 originator cache.

Fixes: e50d18c39f92 ("alfred: Cache the TQ values for each originator")
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 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)
-- 
2.11.0


  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 ` Sven Eckelmann [this message]
2017-06-01  6:26 ` [B.A.T.M.A.N.] [PATCH 3/3] alfred: Always initialize translation cache hash pointer Sven Eckelmann
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-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox