mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-08 09:25:49 +01:00
Changed wrealloc's behaviour to call wfree() and return NULL if the newly
requested size is 0.
This commit is contained in:
@@ -114,6 +114,9 @@ void *wrealloc(void *ptr, size_t newsize)
|
||||
|
||||
if (!ptr) {
|
||||
nptr = wmalloc(newsize);
|
||||
} else if (newsize==0) {
|
||||
wfree(ptr);
|
||||
nptr = NULL;
|
||||
} else {
|
||||
#ifdef TEST_WITH_GC
|
||||
nptr = GC_realloc(ptr, newsize);
|
||||
|
||||
Reference in New Issue
Block a user