b7d4d7
From 31cd7627ff329a39691239322df3bc88e962ad02 Mon Sep 17 00:00:00 2001
b7d4d7
From: Xavi Hernandez <xhernandez@redhat.com>
b7d4d7
Date: Mon, 1 Mar 2021 05:19:39 +0100
b7d4d7
Subject: [PATCH 538/538] afr: fix coverity issue introduced by 90cefde
b7d4d7
b7d4d7
Fixes coverity issues 1447029 and 1447028.
b7d4d7
b7d4d7
Backport of:
b7d4d7
> Upstream-patch-link: https://github.com/gluster/glusterfs/pull/2201
b7d4d7
> Updates: #2161
b7d4d7
> Change-Id: I6a564231d6aeb76de20675b7ced5d45eed8c377f
b7d4d7
> Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
b7d4d7
b7d4d7
BUG: 1911292
b7d4d7
Change-Id: I6a564231d6aeb76de20675b7ced5d45eed8c377f
b7d4d7
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
b7d4d7
Reviewed-on: https://code.engineering.redhat.com/gerrit/229200
b7d4d7
Tested-by: RHGS Build Bot <nigelb@redhat.com>
b7d4d7
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
b7d4d7
---
b7d4d7
 xlators/cluster/afr/src/afr-inode-read.c | 4 ++--
b7d4d7
 1 file changed, 2 insertions(+), 2 deletions(-)
b7d4d7
b7d4d7
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
b7d4d7
index 98e195a..d874172 100644
b7d4d7
--- a/xlators/cluster/afr/src/afr-inode-read.c
b7d4d7
+++ b/xlators/cluster/afr/src/afr-inode-read.c
b7d4d7
@@ -918,13 +918,13 @@ afr_update_local_dicts(call_frame_t *frame, dict_t *dict, dict_t *xdata)
b7d4d7
     }
b7d4d7
 
b7d4d7
     if (dict != NULL) {
b7d4d7
-        if (dict_copy(dict, local->dict) < 0) {
b7d4d7
+        if (dict_copy(dict, local->dict) == NULL) {
b7d4d7
             goto done;
b7d4d7
         }
b7d4d7
     }
b7d4d7
 
b7d4d7
     if (xdata != NULL) {
b7d4d7
-        if (dict_copy(xdata, local->xdata_rsp) < 0) {
b7d4d7
+        if (dict_copy(xdata, local->xdata_rsp) == NULL) {
b7d4d7
             goto done;
b7d4d7
         }
b7d4d7
     }
b7d4d7
-- 
b7d4d7
1.8.3.1
b7d4d7