From 07072898bec59189e1cec991fb179d04ac485a7a Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Thu, 4 Oct 2018 19:17:56 +0530 Subject: cloudsync: coverity fix CID: 1394649 1394657 Issue: Explicit null dereferenced Change-Id: Ic1040ffa5548e1ecd49cfdc9a8716be445cbdf0f Updates: bz#789278 Signed-off-by: Susant Palai --- .../src/cloudsync-plugins/src/cloudsyncs3/src/libcloudsyncs3.c | 2 ++ xlators/features/cloudsync/src/cloudsync.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/features') 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"); -- cgit