summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorJeff Darcy <jdarcy@redhat.com>2016-04-04 17:29:38 -0400
committerJeff Darcy <jdarcy@redhat.com>2016-04-06 13:48:33 -0700
commitecdcd519b9d7b50215072f47e00ce326d1242934 (patch)
tree67bbfc731497d37f7f0a6237e0c390c32b7dfb2a /cli/src/cli-cmd-volume.c
parent7370633b6404bbd3c8238b464bc413689dcccf93 (diff)
cli: fix double free of options dictionary
In cli_cmd_volume_getopt_cbk and cli_cmd_volume_barrier_cbk, we were freeing our options directory, which was incorrect because we had already put it in our local structure (via CLI_LOCAL_INIT) and it was being freed from there (via CLI_STACK_DESTROY and cli_local_wipe). This was causing mount.t to hang consistently in a vagrant environment, with the CLI stuck trying to take a lock on a dictionary that had already been freed. While this made it possible to debug, the same problem might be behind some other intermittent regression test failures as well. Change-Id: I70aa7c69f63243f5423d68e2cfaefca81b937aad Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/13903 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index d332b3a12e8..5a153c68f6b 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -2432,8 +2432,6 @@ out:
cli_err ("Volume barrier failed");
}
CLI_STACK_DESTROY (frame);
- if (options)
- dict_unref (options);
return ret;
}
@@ -2486,8 +2484,6 @@ out:
cli_err ("Volume get option failed");
}
CLI_STACK_DESTROY (frame);
- if (options)
- dict_unref (options);
return ret;
}