summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/graph.c')
-rw-r--r--libglusterfs/src/graph.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
index 52e79ab68cd..f6db5557a33 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -765,12 +765,12 @@ glusterfs_graph_reconfigure (glusterfs_graph_t *oldgraph,
int
glusterfs_graph_destroy (glusterfs_graph_t *graph)
{
- xlator_tree_free (graph->first);
+ GF_VALIDATE_OR_GOTO ("graph", graph, out);
- if (graph) {
- list_del_init (&graph->list);
- GF_FREE (graph);
- }
+ xlator_tree_free (graph->first);
+ list_del_init (&graph->list);
+ GF_FREE (graph);
+out:
return 0;
}