Fix memory leaks reported by Coverity.
Fixes:
6b89650418 ("test/graph: add functional tests")
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
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;
}
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;
}
}