From 197fb8504c51df4fdf0e7837b11d1aed2872e2da Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 15 Nov 2017 11:27:53 +0100 Subject: ipcpd: Reset *dist on graph_routing_table fail The *dist pointer was not reset on failure, causing the caller to try to free an unmalloced or already freed pointer. Reported-by: Nick Aerts Tested-by: Nick Aerts Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/ipcpd/normal/pol/graph.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/ipcpd/normal/pol/graph.c b/src/ipcpd/normal/pol/graph.c index eade23e0..a0af19f9 100644 --- a/src/ipcpd/normal/pol/graph.c +++ b/src/ipcpd/normal/pol/graph.c @@ -537,6 +537,7 @@ static int graph_routing_table_simple(struct graph * graph, free_routing_table(table); free(nhops); fail_vertices: + *dist = NULL; return -1; } -- cgit v1.2.3