summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index aa493bd76ef..3c7b6285562 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -318,9 +318,10 @@ glusterd_op_send_cli_response (glusterd_op_t op, int32_t op_ret,
else
rsp.op_errstr = "";
ctx = op_ctx;
- dict_allocate_and_serialize (ctx,
- &rsp.stats_info.stats_info_val,
- (size_t*)&rsp.stats_info.stats_info_len);
+ if (ctx)
+ dict_allocate_and_serialize (ctx,
+ &rsp.stats_info.stats_info_val,
+ (size_t*)&rsp.stats_info.stats_info_len);
free_ptr = rsp.stats_info.stats_info_val;
cli_rsp = &rsp;
xdrproc = (xdrproc_t) xdr_gf1_cli_stats_volume_rsp;