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 <kirankumark@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
parent
9330521cb8
commit
c5a56c5897
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue