From 2e587ee4931a5d47cc4ba5894d8769bff6e13d02 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Tue, 3 Mar 2020 22:53:57 +0100
Subject: [PATCH] Initialize desc in case of failure

---
 control/descriptor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/control/descriptor.c b/control/descriptor.c
index 8c8ac0c67..b8d0e080b 100644
--- a/control/descriptor.c
+++ b/control/descriptor.c
@@ -761,7 +761,7 @@ int CHAMELEON_Desc_Create_OOC(CHAM_desc_t **descptr, cham_flttype_t dtyp, int mb
  */
 CHAM_desc_t *CHAMELEON_Desc_Copy( CHAM_desc_t *descin, void *mat )
 {
-    CHAM_desc_t *descout;
+    CHAM_desc_t *descout = NULL;
     CHAMELEON_Desc_Create_User( &descout, mat,
                                 descin->dtyp, descin->mb, descin->nb, descin->bsiz,
                                 descin->lm, descin->ln, descin->i, descin->j, descin->m, descin->n, descin->p, descin->q,
@@ -796,7 +796,7 @@ CHAM_desc_t *CHAMELEON_Desc_Copy( CHAM_desc_t *descin, void *mat )
  */
 CHAM_desc_t *CHAMELEON_Desc_CopyOnZero( CHAM_desc_t *descin, void *mat )
 {
-    CHAM_desc_t *descout;
+    CHAM_desc_t *descout = NULL;
     CHAMELEON_Desc_Create_User( &descout, mat,
                                 descin->dtyp, descin->mb, descin->nb, descin->bsiz,
                                 descin->lm, descin->ln, descin->i, descin->j, descin->m, descin->n, 1, 1,
-- 
GitLab