summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAkarsha Rai <akrai@redhat.com>2017-09-26 04:58:19 -0400
committerJeff Darcy <jeff@pl.atyp.us>2017-09-28 12:55:19 +0000
commit3a423437e35fa46befa28fa030cef26d6663e507 (patch)
treefb680d8bd98d9f43c23799877fe628ded0832eb7 /xlators
parent165827e3812942f8a9bd96880bc316820a297821 (diff)
cluster/ec: FORWARD_NULL coverity fix
Problem: Pool pointer could be NULL while destroying it. Solution: Verifying pointer before destroying it. BUG: 789278 Change-Id: I497d1310aa47cb749a4c992aa961bd4dfa23ee48 Signed-off-by: Akarsha Rai <akrai@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/ec/src/ec-method.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-method.c b/xlators/cluster/ec/src/ec-method.c
index a2dd2bd..fdc8939 100644
--- a/xlators/cluster/ec/src/ec-method.c
+++ b/xlators/cluster/ec/src/ec-method.c
@@ -379,7 +379,9 @@ ec_method_fini(ec_matrix_list_t *list)
ec_code_destroy(list->code);
ec_gf_destroy(list->gf);
GF_FREE(list->objects);
- mem_pool_destroy(list->pool);
+
+ if (list->pool)
+ mem_pool_destroy(list->pool);
}
int32_t