summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-entry-ops.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-08-28 00:01:26 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-31 01:26:06 +0000
commitd3b1456c52f7dc4f21cdae2855092fda6b96af4a (patch)
tree3ccc6d7cac5c93bfcc3d67fdfd1effa853e13735 /xlators/storage/posix/src/posix-entry-ops.c
parent6a2f83caad7ff882e3a8da5fdec4be8ceccbfdc2 (diff)
clang-scan: fix multiple issues
* Buffer overflow issue in glusterfsd * Null argument passed to function expecting non-null (event-epoll) * Make sure the op_ret value is set in macro (posix) Updates: bz#1622665 Change-Id: I32b378fc40a5e3ee800c0dfbc13335d44c9db9ac Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-entry-ops.c')
-rw-r--r--xlators/storage/posix/src/posix-entry-ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-entry-ops.c b/xlators/storage/posix/src/posix-entry-ops.c
index 11ce9d69540..34dff4bd726 100644
--- a/xlators/storage/posix/src/posix-entry-ops.c
+++ b/xlators/storage/posix/src/posix-entry-ops.c
@@ -1725,7 +1725,7 @@ posix_rename (call_frame_t *frame, xlator_t *this,
}
if ((xdata) && (dict_get (xdata, GET_LINK_COUNT))
- && (real_newpath) && (was_present)) {
+ && (real_newpath) && (was_present) && ctx_new) {
pthread_mutex_lock (&ctx_new->pgfid_lock);
locked = _gf_true;
get_link_count = _gf_true;