summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-inode-read.c
diff options
context:
space:
mode:
authorHarpreet Lalwani <hlalwani@redhat.com>2018-10-04 16:09:08 +0530
committerN Balachandran <nbalacha@redhat.com>2018-10-31 09:42:14 +0000
commitd2d3c37fa8efca74e375b8a0dc7fa720c3b84dcc (patch)
treea5adbe9849a1e40e41bbee046369f080d10ce8e5 /xlators/cluster/dht/src/dht-inode-read.c
parent9be6bf3d90e3783b3ba559c93d41b933f8d53f03 (diff)
cluster/dht: NULL pointer dereferencing clang fix
Dereferencing NUll pointers this,local and stbuf. 1.Replaced this->name with "dht". 2.Removed GF_VALIDATE_OR_GOTO. 3.Removed the check for "stbuf" and "this". Updates: bz#1622665 Change-Id: Id2fb2270d5ec37b76fa2aae1f1c8dca72dcc728a Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-inode-read.c')
-rw-r--r--xlators/cluster/dht/src/dht-inode-read.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/xlators/cluster/dht/src/dht-inode-read.c b/xlators/cluster/dht/src/dht-inode-read.c
index f2be5120e37..f46370a9208 100644
--- a/xlators/cluster/dht/src/dht-inode-read.c
+++ b/xlators/cluster/dht/src/dht-inode-read.c
@@ -265,12 +265,6 @@ dht_attr_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
dht_local_t *local = NULL;
int this_call_cnt = 0;
xlator_t *prev = NULL;
-
- GF_VALIDATE_OR_GOTO("dht", frame, err);
- GF_VALIDATE_OR_GOTO("dht", this, out);
- GF_VALIDATE_OR_GOTO("dht", frame->local, out);
- GF_VALIDATE_OR_GOTO("dht", cookie, out);
-
local = frame->local;
prev = cookie;
@@ -290,13 +284,13 @@ dht_attr_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
}
unlock:
UNLOCK(&frame->lock);
-out:
+
this_call_cnt = dht_frame_return(frame);
if (is_last_call(this_call_cnt)) {
DHT_STACK_UNWIND(stat, frame, local->op_ret, local->op_errno,
&local->stbuf, xdata);
}
-err:
+
return 0;
}