diff options
author | Susant Palai <spalai@redhat.com> | 2019-04-29 11:36:16 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-04-30 06:26:20 +0000 |
commit | cfd838c27cc88acd431549f2b8ed515c9ce3e55f (patch) | |
tree | 35307ef1be1e41d5f02119fe1a6e4c990c2c70c6 /xlators/features | |
parent | e6721e1426b116af7460111e8dddd432aea504a2 (diff) |
cloudsync/plugin: coverity fixes
CID 1401087: Null pointer dereferences (REVERSE_INULL)
CID 1401088: Null pointer dereferences (FORWARD_NULL)
Change-Id: I71bf67af80e1b22bcd2eb997b01a1a5ef0b4d80b
Updates: bz#789278
Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/libcvlt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/libcvlt.c b/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/libcvlt.c index e827882f68d..5243c8bd492 100644 --- a/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/libcvlt.c +++ b/xlators/features/cloudsync/src/cloudsync-plugins/src/cvlt/src/libcvlt.c @@ -264,10 +264,12 @@ cvlt_init_xlator(xlator_t *this, archive_t *arch, int num_req, int num_iatt) return ret; err: - cvlt_free_resources(arch); + if (arch) { + cvlt_free_resources(arch); - if (locked) { - UNLOCK(&(arch->lock)); + if (locked) { + UNLOCK(&(arch->lock)); + } } return ret; @@ -445,9 +447,7 @@ out: STACK_UNWIND_STRICT(readv, frame, op_ret, op_errno, &iov, 1, &postbuf, req->iobref, local->xattr_rsp); - if (req) { - cvlt_free_req(priv, req); - } + cvlt_free_req(priv, req); return; } |