diff options
author | Susant Palai <spalai@redhat.com> | 2018-10-04 19:17:56 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-10 05:39:56 +0000 |
commit | 07072898bec59189e1cec991fb179d04ac485a7a (patch) | |
tree | db1e624676fd940c1a0b045b4369b3c5ed1a59a3 /xlators/features/cloudsync | |
parent | 3fa73bfdb5183cb8077d43c3c219c3fd9e9a1b65 (diff) |
cloudsync: coverity fix
CID: 1394649 1394657
Issue: Explicit null dereferenced
Change-Id: Ic1040ffa5548e1ecd49cfdc9a8716be445cbdf0f
Updates: bz#789278
Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/features/cloudsync')
-rw-r--r-- | xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c | 2 | ||||
-rw-r--r-- | xlators/features/cloudsync/src/cloudsync.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c index dad29fc0e4f..e2bbb680f6c 100644 --- a/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c +++ b/xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c @@ -454,6 +454,8 @@ aws_download_s3(call_frame_t *frame, void *config) }; aws_private_t *priv = NULL; + this = frame->this; + local = frame->local; priv = (aws_private_t *)config; diff --git a/xlators/features/cloudsync/src/cloudsync.c b/xlators/features/cloudsync/src/cloudsync.c index 00437aaf80c..918ed786b6b 100644 --- a/xlators/features/cloudsync/src/cloudsync.c +++ b/xlators/features/cloudsync/src/cloudsync.c @@ -1263,14 +1263,14 @@ cs_blocking_inodelk(call_frame_t *parent_frame) }; int ret = 0; + this = parent_frame->this; + lock_frame = cs_lock_frame(parent_frame); if (!lock_frame) { gf_msg(this->name, GF_LOG_ERROR, 0, 0, "insuffcient memory"); goto err; } - this = parent_frame->this; - lock_local = cs_local_init(this, lock_frame, NULL, NULL, 0); if (!lock_local) { gf_msg(this->name, GF_LOG_ERROR, 0, 0, "local init failed"); |