|
|
d2787b |
From 84aaaded4e958a10c7492233c053e3c681f2d575 Mon Sep 17 00:00:00 2001
|
|
|
d2787b |
From: nik-redhat <nladha@redhat.com>
|
|
|
d2787b |
Date: Thu, 2 Jul 2020 18:10:32 +0530
|
|
|
d2787b |
Subject: [PATCH 598/610] glusterd: null dereference
|
|
|
d2787b |
|
|
|
d2787b |
Issue:
|
|
|
d2787b |
There has been either an explicit null
|
|
|
d2787b |
dereference or a dereference after null
|
|
|
d2787b |
check in some cases.
|
|
|
d2787b |
|
|
|
d2787b |
Fix:
|
|
|
d2787b |
Added the proper condition for null check
|
|
|
d2787b |
and fixed null derefencing.
|
|
|
d2787b |
|
|
|
d2787b |
CID: 1430106 : Dereference after null check
|
|
|
d2787b |
CID: 1430120 : Explicit null dereferenced
|
|
|
d2787b |
CID: 1430132 : Dereference after null check
|
|
|
d2787b |
CID: 1430134 : Dereference after null check
|
|
|
d2787b |
|
|
|
d2787b |
>Change-Id: I7e795cf9f7146a633097c26a766f16b159881fa3
|
|
|
d2787b |
>Updates: #1060
|
|
|
d2787b |
>Signed-off-by: nik-redhat <nladha@redhat.com>
|
|
|
d2787b |
|
|
|
d2787b |
Upstream link: https://review.gluster.org/c/glusterfs/+/24664
|
|
|
d2787b |
BUG: 1997447
|
|
|
d2787b |
|
|
|
d2787b |
Change-Id: I2b2632c93094d0e7b9fbd65a2ca2b0eaf6212d79
|
|
|
d2787b |
Signed-off-by: nik-redhat <nladha@redhat.com>
|
|
|
d2787b |
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/280083
|
|
|
d2787b |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d2787b |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d2787b |
---
|
|
|
d2787b |
xlators/mgmt/glusterd/src/glusterd-syncop.c | 2 +-
|
|
|
d2787b |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
d2787b |
|
|
|
d2787b |
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
|
|
|
d2787b |
index 05c9e11..f1807cd 100644
|
|
|
d2787b |
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
|
|
|
d2787b |
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
|
|
|
d2787b |
@@ -1797,7 +1797,7 @@ gd_brick_op_phase(glusterd_op_t op, dict_t *op_ctx, dict_t *req_dict,
|
|
|
d2787b |
pending_node = NULL;
|
|
|
d2787b |
ret = 0;
|
|
|
d2787b |
out:
|
|
|
d2787b |
- if (pending_node)
|
|
|
d2787b |
+ if (pending_node && pending_node->node)
|
|
|
d2787b |
glusterd_pending_node_put_rpc(pending_node);
|
|
|
d2787b |
|
|
|
d2787b |
if (rsp_dict)
|
|
|
d2787b |
--
|
|
|
d2787b |
1.8.3.1
|
|
|
d2787b |
|