代码拉取完成,页面将自动刷新
From dee1c932df22ee12fe4568b40e58a475309e62fd Mon Sep 17 00:00:00 2001
From: karthik-us <[email protected]>
Date: Thu, 7 Oct 2021 21:18:49 +0530
Subject: [PATCH 604/610] Coverity: Fix dereference before null check (CID:
1391415)
Problem:
In function gf_client_dump_inodes_to_dict() there is a null check for
a variable which is already dereferenced in the previous line. This
means that there could be a chance that this variable is null. But it
is not being validate for null before dereferencing it in the first
place.
Fix:
Added null check before dereferencing the variable at the first place.
> Upstream patch: https://github.com/gluster/glusterfs/pull/2369/
> Change-Id: I988b0e93542782353a8059e33db1522b6a5e55f8
> Signed-off-by: karthik-us <[email protected]>
> Updates: gluster#1060
BUG: 1997447
Change-Id: I988b0e93542782353a8059e33db1522b6a5e55f8
Signed-off-by: karthik-us <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/c/rhs-glusterfs/+/280103
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <[email protected]>
---
libglusterfs/src/client_t.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c
index e875c8b..216900a 100644
--- a/libglusterfs/src/client_t.c
+++ b/libglusterfs/src/client_t.c
@@ -828,8 +828,9 @@ gf_client_dump_inodes_to_dict(xlator_t *this, dict_t *dict)
clienttable->cliententries[count].next_free)
continue;
client = clienttable->cliententries[count].client;
- if (!strcmp(client->bound_xl->name, this->name)) {
- if (client->bound_xl && client->bound_xl->itable) {
+ if (client->bound_xl &&
+ !strcmp(client->bound_xl->name, this->name)) {
+ if (client->bound_xl->itable) {
/* Presently every brick contains only
* one bound_xl for all connections.
* This will lead to duplicating of
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。