summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2018-02-19 20:36:05 +0530
committerPoornima G <pgurusid@redhat.com>2018-02-27 11:38:30 +0000
commit5196bfa6e633475a3f5b8d413e2d1e7c870b28f2 (patch)
tree8a76794333acb4464bc27a4db827601dc5cd491d /xlators/performance/io-cache
parentbb4343fb1a66cf20b6ee8ef3937cd3852d5082c2 (diff)
io-cache: Fix coverity issue
Coverity issue : FORWARD_NULL fd is assigned within a condition, but the fd is used even outside the condition. Change-Id: I6548d605d8a8acc6a25f1657f9fb75586d513042 Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 939d28f63e2..68191c56cf6 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -1411,10 +1411,8 @@ ioc_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
char *path = NULL;
fd_t *fd = NULL;
- if (frame) {
- fd = frame->local;
- frame->local = NULL;
- }
+ fd = frame->local;
+ frame->local = NULL;
if (op_ret <= 0)
goto unwind;