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 <sunkumar@redhat.com>
This commit is contained in:
Sunny Kumar 2018-08-10 02:20:01 +05:30 committed by Amar Tumballi
parent e35424da73
commit 0ef74dbd70

View File

@ -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: