diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2018-08-30 16:31:39 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-31 01:24:40 +0000 |
commit | 33f53e88c31394ef5b0b927cd11f8b349647b435 (patch) | |
tree | c52772fbcded4abe2becef937620636ebed2f672 /cli/src | |
parent | a654ae2442899348aae136365786dc44a9f502ca (diff) |
cli : fix coverity issue in cli-cmd-volume.c
This patch fixes 1389756.
Change-Id: I72d4f618368545a5dcee0ca59fe87ba6137ab4a1
updates: bz#789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 70a7a1a19d7..b9fd56362cf 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -2102,14 +2102,14 @@ out: cli_cmd_sent_status_get (&sent); if ((sent == 0) && (parse_error == 0)) cli_out ("Volume remove-brick failed"); - } else { + } #if (USE_EVENTS) - if (!event_ret) { - gf_event (event, "%s", event_str); - GF_FREE (event_str); - } + if (!ret && !event_ret) + gf_event (event, "%s", event_str); + if (event_str) + GF_FREE (event_str); + #endif - } CLI_STACK_DESTROY (frame); |