From 62c4a5dfc74bf50d9c4947a28d628ed6195ca111 Mon Sep 17 00:00:00 2001
From: Ali Mohammed <ali.mohammed@hpe.com>
Date: Mon, 20 Dec 2021 11:55:03 +0100
Subject: [PATCH] properly initialize dis_layout in cdo_handle and cdo handle
 destroy status

---
 maestro/pool_manager_registry.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/maestro/pool_manager_registry.c b/maestro/pool_manager_registry.c
index 6f1eb45f..07f40ccb 100644
--- a/maestro/pool_manager_registry.c
+++ b/maestro/pool_manager_registry.c
@@ -1496,6 +1496,8 @@ mstro_pm__cdo_handle_entry__create(uint64_t local_id, mstro_cdo_state state,
   tmp->local_id = local_id;
   tmp->cdo_state = state;
   tmp->attributes = NULL;
+  tmp->n_segments = 0;
+  tmp->dist_layout = NULL;
   *result = tmp;
   return MSTRO_OK;
 }
@@ -1504,7 +1506,7 @@ static inline
 mstro_status
 mstro_pm__cdo_handle_entry__destroy(struct cdo_handle_entry *h)
 {
-  mstro_status m_status = MSTRO_UNIMPL;
+  mstro_status m_status = MSTRO_OK;
   mmbError stat = MMB_OK;
   if(h==NULL)
     return MSTRO_INVARG;
-- 
GitLab