diff --git a/xmlmemory.c b/xmlmemory.c index 90306e38b..0875a7985 100644 --- a/xmlmemory.c +++ b/xmlmemory.c @@ -367,6 +367,9 @@ xmlGrowArray(void *array, size_t elemSize, int *capacity, int min, int max) { void *tmp; int newSize; + if (capacity == NULL) + return(NULL); + newSize = xmlGrowCapacity(*capacity, elemSize, min, max); if (newSize < 0) return(NULL);