From b8dcae849e6bd68cc9c3848f36aaf697898674f5 Mon Sep 17 00:00:00 2001 From: schnetter Date: Thu, 24 Mar 2005 15:15:59 +0000 Subject: Allow realloc to return NULL for a zero-sized request git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@463 b61c5cb5-eaca-4651-9a7a-d64986f99364 --- src/SetupGroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SetupGroup.c b/src/SetupGroup.c index bb0b640..26f3be4 100644 --- a/src/SetupGroup.c +++ b/src/SetupGroup.c @@ -186,7 +186,7 @@ static int PUGH_SetupGAGroup (pGH *newGH, temp = realloc (newGH->variables, (newGH->nvariables+n_variables) * sizeof (void **)); - if(temp) + if(newGH->nvariables+n_variables==0 || temp) { newGH->variables = temp; -- cgit v1.2.3