Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Stephen Hemminger
Jan. 24, 2022, 12:05 a.m. UTC
Remove redundant NULL pointer checks before free functions
found by nullfree.cocci
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/graph/graph_stats.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c index aa70929dc32e..65e12d46a313 100644 --- a/lib/graph/graph_stats.c +++ b/lib/graph/graph_stats.c @@ -233,8 +233,7 @@ cluster_add(struct cluster *cluster, struct graph *graph) static void cluster_fini(struct cluster *cluster) { - if (cluster->graphs) - free(cluster->graphs); + free(cluster->graphs); } static int