aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Startup.c')
-rw-r--r--src/Startup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Startup.c b/src/Startup.c
index 2d2e06e..a7ee198 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -131,8 +131,9 @@ static void *SetupGH (tFleshConfig *config, int conv_level, cGH *GH)
myGH = malloc (sizeof (ioHDF5GH));
myGH->out_last = malloc (numvars * sizeof (int));
myGH->requests = calloc (numvars, sizeof (ioRequest *));
- myGH->cp_filename_list = calloc (abs (checkpoint_keep), sizeof (char *));
myGH->cp_filename_index = 0;
+ myGH->checkpoint_keep = abs (checkpoint_keep);
+ myGH->cp_filename_list = calloc (myGH->checkpoint_keep, sizeof (char *));
myGH->out_vars = strdup ("");
myGH->out_every_default = out_every - 1;
myGH->last_checkpoint_iteration = -1;