aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2002-07-05 14:58:46 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2002-07-05 14:58:46 +0000
commitda31b28e404a21a1bdc8470234cf8b6845d8a1fc (patch)
tree30eb236093756554349f9bc80f17b21ef9e507b0
parente55042ea7847cd24ea89fd162c30e2c09f12b846 (diff)
Really set deallocated data pointers for grid arrays to NULL.
Before they got allocated to a single array element. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@394 b61c5cb5-eaca-4651-9a7a-d64986f99364
-rw-r--r--src/SetupPGV.c4
-rw-r--r--src/Storage.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/SetupPGV.c b/src/SetupPGV.c
index 0699549..edebb6a 100644
--- a/src/SetupPGV.c
+++ b/src/SetupPGV.c
@@ -1515,14 +1515,14 @@ pGA *PUGH_SetupGArray(void *parent,
this->storage = PUGH_NOSTORAGE;
this->name = (char *) malloc((strlen(name)+1)*sizeof(char));
- this->padddata = (void *) calloc(1, varsize);
+ this->padddata = NULL;
this->data = this->padddata;
this->vector_size = vector_size;
this->vector_entry = vector_entry;
this->vector_base = vector_base;
- if(this->name && this->padddata)
+ if(this->name) // && this->padddata)
{
strcpy(this->name, name);
}
diff --git a/src/Storage.c b/src/Storage.c
index 210b1d2..0dfb5f1 100644
--- a/src/Storage.c
+++ b/src/Storage.c
@@ -959,7 +959,7 @@ static int PUGH_EnableGArrayGroupStorage (pGH *pughGH,
{
free (GA->padddata);
}
- GA->padddata = calloc (1, GA->varsize);
+ GA->padddata = NULL;
GA->data = GA->padddata;
}