From d3b1456c52f7dc4f21cdae2855092fda6b96af4a Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 28 Aug 2018 00:01:26 +0530 Subject: 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 --- xlators/storage/posix/src/posix-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/storage/posix/src/posix-helpers.c') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index d521d80e8aa..99be6366e11 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -3390,7 +3390,7 @@ posix_cs_maintenance (xlator_t *this, fd_t *fd, loc_t *loc, int *pfd, } else { if (!loc->inode) { ret = 0; - goto unlock; + goto out; } LOCK (&loc->inode->lock); @@ -3450,6 +3450,6 @@ unlock: UNLOCK (&fd->inode->lock); else UNLOCK (&loc->inode->lock); - +out: return ret; } -- cgit