X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7aa7c43a9c253577960f53c5e41d3e60ec8136d5..d8770b1245ff0acd81f581c5667563e0d127104a:/tree234.c diff --git a/tree234.c b/tree234.c index fafb3706..7830aebb 100644 --- a/tree234.c +++ b/tree234.c @@ -6,10 +6,12 @@ #include #include +#include "puttymem.h" + #include "tree234.h" -#define mknew(typ) ( (typ *) malloc (sizeof (typ)) ) -#define sfree free +#define mknew(typ) ( (typ *) smalloc (sizeof (typ)) ) +/* #define sfree free */ #ifdef TEST #define LOG(x) (printf x) @@ -819,8 +821,8 @@ void addtest(void *elem) { if (arraysize < arraylen+1) { arraysize = arraylen+1+256; - array = (array == NULL ? malloc(arraysize*sizeof(*array)) : - realloc(array, arraysize*sizeof(*array))); + array = (array == NULL ? smalloc(arraysize*sizeof(*array)) : + srealloc(array, arraysize*sizeof(*array))); } i = 0;