From 72d3fc1eebae676d0af1f6bd1b122a32b0299ab7 Mon Sep 17 00:00:00 2001 From: rhaas Date: Wed, 23 Oct 2013 16:00:15 +0000 Subject: correct amount of memory allocated in d3tensor had mixed up depth and length before git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TwoPunctures/trunk@135 b2a53a04-0f4f-0410-87ed-f9f25ced00cf --- src/TP_utilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TP_utilities.c b/src/TP_utilities.c index f883a78..cca944d 100644 --- a/src/TP_utilities.c +++ b/src/TP_utilities.c @@ -112,7 +112,7 @@ d3tensor (long nrl, long nrh, long ncl, long nch, long ndl, long ndh) CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (2) in dmatrix()"); /* get all memory for the tensor in on chunk */ - retval[0][0] = malloc(sizeof(CCTK_REAL)*(nrh-nrl+1)*(nch-ncl+1)*(nrh-nrl+1)); + retval[0][0] = malloc(sizeof(CCTK_REAL)*(nrh-nrl+1)*(nch-ncl+1)*(ndh-ndl+1)); if(retval[0][0] == NULL) CCTK_WARN (CCTK_WARN_ABORT, "allocation failure (3) in dmatrix()"); -- cgit v1.2.3