summaryrefslogtreecommitdiff
path: root/xmlmemory.c
diff options
context:
space:
mode:
authorAleksey Sanin <aleksey@src.gnome.org>2004-01-22 22:20:31 +0000
committerAleksey Sanin <aleksey@src.gnome.org>2004-01-22 22:20:31 +0000
commite9f0811a2fab2491383c6d78800ab07a0b4f8336 (patch)
tree7f8d95cbd315bec1a5fbbbf4e34b98c981e47720 /xmlmemory.c
parent1516d5b3478e90e35ac7e94fea9b2ab5156dfb0b (diff)
downloadlibxml2-e9f0811a2fab2491383c6d78800ab07a0b4f8336.tar.gz
make xmlReallocLoc() accept NULL pointer
Diffstat (limited to 'xmlmemory.c')
-rw-r--r--xmlmemory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmlmemory.c b/xmlmemory.c
index ccd8f55b..927d078c 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -310,9 +310,10 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
MEMHDR *p;
unsigned long number;
- if (!xmlMemInitialized) xmlInitMemory();
if (ptr == NULL)
- return(NULL);
+ return(xmlMallocLoc(size, file, line));
+
+ if (!xmlMemInitialized) xmlInitMemory();
TEST_POINT
p = CLIENT_2_HDR(ptr);