From eda8b57eb4a53e6cfea69e50735a47be910b0581 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 2 Jul 2016 18:03:51 +0200 Subject: [PATCH] use TMALLOC --- src/maths/KLU/klu_utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/maths/KLU/klu_utils.c b/src/maths/KLU/klu_utils.c index be82f57c8..2e1ad246f 100644 --- a/src/maths/KLU/klu_utils.c +++ b/src/maths/KLU/klu_utils.c @@ -1,3 +1,4 @@ +#include "ngspice/memory.h" #include "klu_internal.h" typedef struct sElement { @@ -104,8 +105,8 @@ KLU_convert_matrix_in_CSR /* return TRUE if successful, FALSE otherwise Common->status = KLU_OK ; - MatrixCOO = (Element *) malloc ((size_t)nz * sizeof (Element)) ; - Ap_COO = (Int *) malloc ((size_t)nz * sizeof (Int)) ; + MatrixCOO = TMALLOC(Element, nz); + Ap_COO = TMALLOC(Int, nz); Az_CSC = (Entry *)Ax_CSC ; Az_CSR = (Entry *)Ax_CSR ;