diff options
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index a1626a81e9f..58dc521b565 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -2562,6 +2562,9 @@ glusterfs_process_volfp(glusterfs_ctx_t *ctx, FILE *fp) int ret = -1; xlator_t *trav = NULL; + if (!ctx) + return -1; + graph = glusterfs_graph_construct(fp); if (!graph) { gf_msg("", GF_LOG_ERROR, 0, glusterfsd_msg_26, @@ -2610,7 +2613,7 @@ out: */ if (graph) { xl = graph->first; - if ((ctx && (ctx->active != graph)) && + if ((ctx->active != graph) && (xl && !strcmp(xl->type, "protocol/server"))) { glusterfs_graph_fini(graph); glusterfs_graph_destroy(graph); @@ -2618,7 +2621,7 @@ out: } /* there is some error in setting up the first graph itself */ - if (!ctx || !ctx->active) { + if (!ctx->active) { emancipate(ctx, ret); cleanup_and_exit(ret); } |