From 0ef74dbd70cce5462b289f6f0cfb05082db00ff5 Mon Sep 17 00:00:00 2001 From: Sunny Kumar Date: Fri, 10 Aug 2018 02:20:01 +0530 Subject: uss : fix coverity issues This patch fixes coverity issuse in snapview-server.c CID : 1274119, 1325525 Scan details at [1]. [1]. https://scan6.coverity.com/reports.htm#v42401/p10714/fileInstanceId=84476369&defectInstanceId=25631967&mergedDefectId=778645 Change-Id: I825f09eabf84a2262a079c1f920a673727c5792b updates: bz#789278 Signed-off-by: Sunny Kumar --- xlators/features/snapview-server/src/snapview-server.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index 89684ccac07..9b3f3a54ea7 100644 --- a/xlators/features/snapview-server/src/snapview-server.c +++ b/xlators/features/snapview-server/src/snapview-server.c @@ -901,7 +901,7 @@ svs_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *name, } out: - if (op_ret) + if (op_ret && value) GF_FREE (value); STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno, dict, NULL); @@ -1337,7 +1337,6 @@ svs_glfs_readdir (xlator_t *this, glfs_fd_t *glfd, gf_dirent_t *entries, break; } dirents = NULL; - ret = -1; } out: -- cgit