summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorShyamsundarR <srangana@redhat.com>2018-10-15 20:50:26 -0400
committerAmar Tumballi <amarts@redhat.com>2018-10-16 09:03:12 +0000
commitf179d09326c519abb1868de79598719b93219544 (patch)
tree5fa9274df9b17a392e4f256f85f8063537c333bf /glusterfsd
parentf50625e7b08814e8e1d06a733e9b3516e9cea5e2 (diff)
glusterfsd: Fix coverity issues around unused values
This patch fixes, CID: 1274064, 1274232 The fix is to not add into the return dict the throughput and time values on error computing the same. The pattern applied is the same as when an error occurs during adding either the throughput or the time value to the dict. Change-Id: I33e21e75efbc691f18b818934ef3bf70dd075097 Updates: bz#789278 Signed-off-by: ShyamsundarR <srangana@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index c1f85bf88a7..4339842768f 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -416,6 +416,8 @@ glusterfs_handle_translator_info_get(rpcsvc_request_t *req)
ret = glusterfs_volume_top_write_perf(
blk_size, blk_count, xlator_req.name, &throughput, &time);
}
+ if (ret)
+ goto cont;
ret = dict_set_double(dict, "time", time);
if (ret)
goto cont;