From c49a94135ca4fc24c8fbe3e3354b9f54f834512b Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Tue, 6 Jun 2017 17:45:51 +0530 Subject: [PATCH 490/509] glusterd: fix glusterd crash from glusterd_op_ac_rcvd_brick_op_acc In out label, before checking ev_ctx->rsp_dict we should first check if ev_ctx is not NULL >Reviewed-on: https://review.gluster.org/17478 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >CentOS-regression: Gluster Build System >Reviewed-by: Gaurav Yadav >Reviewed-by: Samikshan Bairagya Change-Id: I28f4f1ee9070617a0e6a23a43af8c5756f96a47e BUG: 1452205 Signed-off-by: Atin Mukherjee Reviewed-on: https://code.engineering.redhat.com/gerrit/108396 Reviewed-by: Samikshan Bairagya --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 5fbf15f..08c39ec 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -7565,7 +7565,7 @@ glusterd_op_ac_rcvd_brick_op_acc (glusterd_op_sm_event_t *event, void *ctx) ev_ctx->commit_ctx); out: - if (ev_ctx->rsp_dict) + if (ev_ctx && ev_ctx->rsp_dict) dict_unref (ev_ctx->rsp_dict); GF_FREE (ev_ctx); gf_msg_debug (this->name, 0, "Returning %d", ret); -- 1.8.3.1