From 3197806ec8b3858a1efeee547254bc8384dcb6f7 Mon Sep 17 00:00:00 2001
From: Utz-Uwe Haus <uhaus@cray.com>
Date: Wed, 2 Nov 2022 11:28:41 +0100
Subject: [PATCH] Fix crashes during error logs in cdo.c

---
 maestro/cdo.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/maestro/cdo.c b/maestro/cdo.c
index a1217e8c..b36a882d 100644
--- a/maestro/cdo.c
+++ b/maestro/cdo.c
@@ -149,7 +149,7 @@ mstro_cdo__alloc(void)
 {
   mstro_cdo res = malloc(sizeof(struct mstro_cdo_));
   if(res==NULL) {
-    ERR("cdo","Cannot allocate a CDO\n");
+    ERR("Cannot allocate a CDO\n");
     abort();
   }
   /* we need to zero out the hash-table relevant parts. For simplicity we zero everything */
@@ -164,7 +164,7 @@ mstro_cdo__alloc(void)
   /* add attribute and default namespace */
   res->current_namespace = strdup(MSTRO_CDO_ATTR_NAMESPACE_DEFAULT);
   if (res->current_namespace == NULL) {
-    ERR("cdo", "Cannot allocate for default CDO namespace\n");
+    ERR("Cannot allocate for default CDO namespace\n");
     free(res);
     abort();
   }
@@ -172,7 +172,8 @@ mstro_cdo__alloc(void)
       g_mstro_core_schema_instance, false, &(res->attributes));
 
   if(s!=MSTRO_OK) {
-    ERR("cdo", "Cannot create CDO, aborting\n");
+    ERR("Cannot set default attribute dict, aborting: %d (%s)\n",
+        s, mstro_status_description(s));
     abort();
   }
 
-- 
GitLab