[commits] [alfred] master: alfred: Always initialize translation cache hash pointer (50a8923)

postmaster at open-mesh.org postmaster at open-mesh.org
Thu Jun 1 10:27:26 CEST 2017


Repository : ssh://git@open-mesh.org/alfred

On branch  : master

>---------------------------------------------------------------

commit 50a8923ccb7c16257cfe94708e2407a19f854c99
Author: Sven Eckelmann <sven at narfation.org>
Date:   Thu Jun 1 08:26:32 2017 +0200

    alfred: Always initialize translation cache hash pointer
    
    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 at narfation.org>
    Signed-off-by: Simon Wunderlich <simon.wunderlich at openmesh.com>


>---------------------------------------------------------------

50a8923ccb7c16257cfe94708e2407a19f854c99
 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 */



More information about the commits mailing list