diff options
author | N Balachandran <nbalacha@redhat.com> | 2018-01-05 08:48:15 +0530 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2018-01-10 06:56:27 +0000 |
commit | c5e4d2c6ff1b2f4451f2c9e79ebc8533a162c8d3 (patch) | |
tree | f530f76f2b73fd9dbc45bd108abde095406230a5 /cli | |
parent | 10e7d18fd65c516a3448f52b8d4c04af68df996c (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>
(cherry picked from commit fa903173540df5b82c295a8f7b24848098e49a41)
Change-Id: I447c939fa9b31e18819a62c3b356c14cca390787
BUG: 1531372
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 166bffbf27a..737dd0b4fca 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; } |