summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAkarsha Rai <akrai@redhat.com>2017-09-26 06:44:15 -0400
committerXavier Hernandez <jahernan@redhat.com>2017-09-29 08:44:19 +0000
commiteebeb504578e774eef6e762326baadaab014b9ae (patch)
tree884cc4dedb35f12bbf0df1f85c06eae4bd9806e9 /xlators
parent703728dd6f0431ba82821794ca6e9e8b43b35811 (diff)
cluster/ec: FORWARD_NULL coverity fix
Problem: cbk could be NULL. Solution: Returning NULL when memory is not allocated for cbk. BUG: 789278 Change-Id: Iea9128e0f3b95100deca560f690f9baaae226abf Signed-off-by: Akarsha Rai <akrai@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/ec/src/ec-data.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-data.c b/xlators/cluster/ec/src/ec-data.c
index 28bf988..9d64280 100644
--- a/xlators/cluster/ec/src/ec-data.c
+++ b/xlators/cluster/ec/src/ec-data.c
@@ -55,6 +55,7 @@ ec_cbk_data_t * ec_cbk_data_allocate(call_frame_t * frame, xlator_t * this,
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
EC_MSG_NO_MEMORY, "Failed to allocate memory for an "
"answer.");
+ return NULL;
}
cbk->fop = fop;