diff options
author | Akarsha Rai <akrai@redhat.com> | 2017-09-26 04:58:19 -0400 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-09-28 12:55:19 +0000 |
commit | 3a423437e35fa46befa28fa030cef26d6663e507 (patch) | |
tree | fb680d8bd98d9f43c23799877fe628ded0832eb7 /xlators | |
parent | 165827e3812942f8a9bd96880bc316820a297821 (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.c | 4 |
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 a2dd2bd3731..fdc89391bfb 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 |