diff options
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 53640261532..08f3bcae58d 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -2778,6 +2778,15 @@ gf_cli_list_friends (call_frame_t *frame, xlator_t *this, (xdrproc_t) xdr_gf1_cli_peer_list_req); out: + if (ret) { + /* + * If everything goes fine, gf_cli_list_friends_cbk() + * [invoked through cli_cmd_submit()]resets the + * frame->local to NULL. In case cli_cmd_submit() + * fails in between, RESET frame->local here. + */ + frame->local = NULL; + } gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret); return ret; } |