aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChooseOutput.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ChooseOutput.c b/src/ChooseOutput.c
index b198422..0ccddf6 100644
--- a/src/ChooseOutput.c
+++ b/src/ChooseOutput.c
@@ -71,10 +71,10 @@ void IOASCII_Choose1D (const cGH *GH)
/* allocate arrays for origins */
- origin_phys[0] = malloc (3 * 3 * sizeof (CCTK_REAL));
+ origin_phys[0] = calloc (3 * 3, sizeof (CCTK_REAL));
origin_phys[1] = origin_phys[0] + 3;
origin_phys[2] = origin_phys[1] + 3;
- origin_index[0] = malloc (3 * 3 * sizeof (int));
+ origin_index[0] = calloc (3 * 3, sizeof (int));
origin_index[1] = origin_index[0] + 3;
origin_index[2] = origin_index[1] + 3;