From 74bc68ac623cc6f4bad824bf7665c4baa8915b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 2 Apr 2014 13:20:00 +0200 Subject: [PATCH] Fix default #define for malloc/free --- ChangeLog | 1 + library/platform.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9f805392..9880d1320 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ Bugfix * Some example server programs were not sending the close_notify alert. * Potential memory leak in mpi_exp_mod() when error occurs during calculation of RR. + * Fixed malloc/free default #define in platform.c (found by Gergely Budai). = PolarSSL 1.3.5 released on 2014-03-26 Features diff --git a/library/platform.c b/library/platform.c index 823b17d13..9051d51a7 100644 --- a/library/platform.c +++ b/library/platform.c @@ -37,7 +37,7 @@ static void *platform_malloc_uninit( size_t len ) return( NULL ); } -#define POLARSSL_PLATFORM_STD_MALLOC memory_malloc_uninit +#define POLARSSL_PLATFORM_STD_MALLOC platform_malloc_uninit #endif /* !POLARSSL_PLATFORM_STD_MALLOC */ #if !defined(POLARSSL_PLATFORM_STD_FREE) @@ -46,7 +46,7 @@ static void platform_free_uninit( void *ptr ) ((void) ptr); } -#define POLARSSL_PLATFORM_STD_FREE memory_free_uninit +#define POLARSSL_PLATFORM_STD_FREE platform_free_uninit #endif /* !POLARSSL_PLATFORM_STD_FREE */ void * (*polarssl_malloc)( size_t ) = POLARSSL_PLATFORM_STD_MALLOC;