From b4cd7036bea6c6440fbbcdaebe53c864c87a5646 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 28 May 2024 14:56:06 -0400 Subject: integrate jkmalloc/prep for readonly --- src/stdlib/free.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/stdlib/free.c') diff --git a/src/stdlib/free.c b/src/stdlib/free.c index e0a1270a..47c04dd0 100644 --- a/src/stdlib/free.c +++ b/src/stdlib/free.c @@ -1,5 +1,6 @@ #include #include "_stdlib.h" +#include "_jkmalloc.h" /** deallocate memory **/ @@ -7,11 +8,9 @@ void free(void * ptr) { SIGNAL_SAFE(0); - if (ptr == NULL) { - return; + if (ptr) { + __jkmalloc(NULL, NULL, 0, ptr, 0, 0, 0); } - - realloc(ptr, 0); } /*** -- cgit v1.2.1