fixed why2_realloc memory leak
so basically - this function was running realloc SO free() was used... I need why2_free() :D fixed that fucking leak yay
This commit is contained in:
parent
c9c65badad
commit
9bfa7453ec
@ -109,7 +109,9 @@ void *why2_calloc(unsigned long element, unsigned long size)
|
||||
|
||||
void *why2_realloc(void *pointer, unsigned long size)
|
||||
{
|
||||
void *allocated = realloc(pointer, size);
|
||||
if (pointer != NULL) why2_free(pointer);
|
||||
|
||||
void *allocated = malloc(size);
|
||||
|
||||
push_to_list(allocated);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user