diff options
Diffstat (limited to 'glusterfsd/src')
| -rw-r--r-- | glusterfsd/src/glusterfsd.c | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index f9f263aae66..106bfe3bcc1 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -2583,11 +2583,14 @@ out:      if (fp)          fclose(fp); -    if (ret && !ctx->active) { -        glusterfs_graph_destroy(graph); +    if (ret) { +        if (graph && (ctx && (ctx->active != graph))) +            glusterfs_graph_destroy(graph);          /* there is some error in setting up the first graph itself */ -        emancipate(ctx, ret); -        cleanup_and_exit(ret); +        if (!ctx->active) { +            emancipate(ctx, ret); +            cleanup_and_exit(ret); +        }      }      return ret;  | 
