summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2018-11-23 11:31:38 +0530
committerAmar Tumballi <amarts@redhat.com>2018-11-26 02:47:33 +0000
commit0967f3dd0d73263c843d76e1837aa78c3fbf14c1 (patch)
treea71c4ff9398ed41379a452a483505b63bd847b9b /xlators/performance
parent6821cec47e2b7d37b1cda90a89bff12b2ac026ec (diff)
coverity: Fix coverity issues
This patch fixes coverity CID : 1356537 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389108&defectInstanceId=26791927&mergedDefectId=1356537 CID : 1395666 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389187&defectInstanceId=26791932&mergedDefectId=1395666 CID : 1351707 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389027&defectInstanceId=26791973&mergedDefectId=1351707 CID : 1396910 https://scan6.coverity.com/reports.htm#v42907/p10714/fileInstanceId=87389027&defectInstanceId=26791973&mergedDefectId=13596910 Change-Id: I8094981a741f4d61b083c05a98df23dcf5b022a2 updates: bz#789278 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/symlink-cache/src/symlink-cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c
index 2a686dcb87e..81a6d6fc296 100644
--- a/xlators/performance/symlink-cache/src/symlink-cache.c
+++ b/xlators/performance/symlink-cache/src/symlink-cache.c
@@ -228,6 +228,7 @@ sc_readlink(call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size,
dict_t *xdata)
{
char *link = NULL;
+ int op_ret = -1;
struct iatt buf = {
0,
};
@@ -243,7 +244,8 @@ sc_readlink(call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size,
using buf in readlink_cbk should be aware that @buf
is 0 filled
*/
- STACK_UNWIND_STRICT(readlink, frame, strlen(link), 0, link, &buf, NULL);
+ op_ret = strlen(link);
+ STACK_UNWIND_STRICT(readlink, frame, op_ret, 0, link, &buf, NULL);
FREE(link);
return 0;
}