diff options
author | Dimitri Staessens <[email protected]> | 2021-05-17 16:50:03 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-05-28 08:19:53 +0200 |
commit | f44ff4dc6d903a626f86919567ce382be31eb3b2 (patch) | |
tree | b40eea6d4b1694999e96972b7bf1e230903b31d4 /src/ipcpd/unicast/pol | |
parent | c43dfe6ef88910eeff96c76a424e74a554d11c55 (diff) | |
download | ouroboros-f44ff4dc6d903a626f86919567ce382be31eb3b2.tar.gz ouroboros-f44ff4dc6d903a626f86919567ce382be31eb3b2.zip |
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 <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/unicast/pol')
-rw-r--r-- | src/ipcpd/unicast/pol/graph.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |