Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-27 15:20:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-27 15:20:50 +0400
commit9d36fade8fb2d130ffdb924349ff478dd272bc8b (patch)
tree5d1a52d9d8824c1f4705710d2d00745f7530ec39 /intern/guardedalloc
parent236bc2748481e88d2cd47a84f2a8b9b0b1cfa0a4 (diff)
make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value.
Diffstat (limited to 'intern/guardedalloc')
-rw-r--r--intern/guardedalloc/intern/mallocn.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 559d1138ffb..0e08c9927d6 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -360,6 +360,9 @@ void *MEM_reallocN(void *vmemh, size_t len)
MEM_freeN(vmemh);
}
+ else {
+ newp = MEM_mallocN(len, __func__);
+ }
return newp;
}
@@ -391,6 +394,9 @@ void *MEM_recallocN(void *vmemh, size_t len)
MEM_freeN(vmemh);
}
+ else {
+ newp = MEM_callocN(len, __func__);
+ }
return newp;
}