From f44ff4dc6d903a626f86919567ce382be31eb3b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 17 May 2021 16:50:03 +0200 Subject: ipcpd: Fix free of uninitialized variable in graph.c The new GCC 11.1 compiler discovered s_dist would be uninitialized with an unknown policy, so it doesn't need to be free'd. Also removes some unneeded includes in broadcast dt.c that I had pending. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/broadcast/dt.c | 2 -- src/ipcpd/unicast/pol/graph.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/ipcpd/broadcast/dt.c b/src/ipcpd/broadcast/dt.c index c3f40909..8b15008b 100644 --- a/src/ipcpd/broadcast/dt.c +++ b/src/ipcpd/broadcast/dt.c @@ -33,7 +33,6 @@ #define DT "dt" #define OUROBOROS_PREFIX DT -#include #include #include #include @@ -45,7 +44,6 @@ #include "common/comp.h" #include "common/connmgr.h" #include "dt.h" -#include "ipcp.h" #include #include diff --git a/src/ipcpd/unicast/pol/graph.c b/src/ipcpd/unicast/pol/graph.c index 51fd0c4b..6ea5c507 100644 --- a/src/ipcpd/unicast/pol/graph.c +++ b/src/ipcpd/unicast/pol/graph.c @@ -834,7 +834,7 @@ int graph_routing_table(struct graph * graph, break; default: log_err("Unsupported algorithm."); - goto fail_algo; + goto fail_table; } pthread_mutex_unlock(&graph->lock); @@ -843,8 +843,6 @@ int graph_routing_table(struct graph * graph, return 0; - fail_algo: - free(s_dist); fail_table: pthread_mutex_unlock(&graph->lock); return -1; -- cgit v1.2.3