summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfsd/src/glusterfsd.c11
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c4
2 files changed, 7 insertions, 8 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index f9f263aae6..106bfe3bcc 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;
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index e79d281365..b1fa6247ee 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -1115,10 +1115,6 @@ glusterd_init_uds_listener(xlator_t *this)
(void)snprintf(sockfile, sizeof(sockfile), "%s",
sock_data ? sock_data->data : DEFAULT_GLUSTERD_SOCKFILE);
- options = dict_new();
- if (!options)
- goto out;
-
ret = rpcsvc_transport_unix_options_build(&options, sockfile);
if (ret)
goto out;