From: Kiran Kumar K Date: Fri, 15 May 2020 07:28:24 +0000 (+0530) Subject: test/graph: fix memory leaks in functional tests X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c5a56c589732a9c84cd70ff19df4282daa13b38f;p=dpdk.git test/graph: fix memory leaks in functional tests Fix memory leaks reported by Coverity. Fixes: 6b89650418 ("test/graph: add functional tests") Signed-off-by: Kiran Kumar K Acked-by: Jerin Jacob --- diff --git a/app/test/test_graph.c b/app/test/test_graph.c index dfb71b44d2..ed69eda997 100644 --- a/app/test/test_graph.c +++ b/app/test/test_graph.c @@ -497,6 +497,7 @@ test_lookup_functions(void) printf("Test number of edges for node = %s failed Expected = %d, got %d\n", tm->test_node[i].node.name, tm->test_node[i].node.nb_edges, count); + free(next_edges); return -1; } @@ -506,6 +507,7 @@ test_lookup_functions(void) printf("Edge name miss match, expected = %s got = %s\n", tm->test_node[i].node.next_nodes[j], next_edges[j]); + free(next_edges); return -1; } }