summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-01-04 12:24:48 +0530
committerN Balachandran <nbalacha@redhat.com>2018-01-04 12:26:29 +0530
commitfa903173540df5b82c295a8f7b24848098e49a41 (patch)
tree017e88c2eeeb2f7a88a3e4032d2d5bc7c9ae14cc /cli/src
parent2632738aea79e61fda0381d3ac1c0a4a4560d32d (diff)
cli: Fixed a use_after_free
gf_event in cli_cmd_volume_create_cbk was accessing memory that had already been freed. Change-Id: I447c939fa9b31e18819a62c3b356c14cca390787 BUG: 1530910 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-cmd-volume.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 53f304023bd..6dade9256e4 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -253,11 +253,12 @@ out:
cli_out ("Volume create failed");
}
- CLI_STACK_DESTROY (frame);
if (ret == 0) {
gf_event (EVENT_VOLUME_CREATE, "name=%s;bricks=%s",
(char *)words[2], bricks);
}
+
+ CLI_STACK_DESTROY (frame);
return ret;
}