summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 0a43ef9b6..5351d4a9d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -2619,13 +2619,15 @@ glusterd_op_commit_send_resp (rpcsvc_request_t *req,
else
rsp.op_errstr = "";
- ret = dict_allocate_and_serialize (rsp_dict,
- &rsp.dict.dict_val,
- (size_t *)&rsp.dict.dict_len);
- if (ret < 0) {
- gf_log ("", GF_LOG_DEBUG,
- "failed to get serialized length of dict");
- goto out;
+ if (rsp_dict) {
+ ret = dict_allocate_and_serialize (rsp_dict,
+ &rsp.dict.dict_val,
+ (size_t *)&rsp.dict.dict_len);
+ if (ret < 0) {
+ gf_log ("", GF_LOG_DEBUG,
+ "failed to get serialized length of dict");
+ goto out;
+ }
}