From adc08d17c3d32b43db7b817a20aca959206b111a Mon Sep 17 00:00:00 2001 From: devsaurus Date: Tue, 21 Nov 2017 18:31:44 +0100 Subject: [PATCH] fix malloc/free from stdlib --- app/u8g2lib/u8x8_d_fbrle.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/u8g2lib/u8x8_d_fbrle.c b/app/u8g2lib/u8x8_d_fbrle.c index b6abf663..49d7077b 100644 --- a/app/u8g2lib/u8x8_d_fbrle.c +++ b/app/u8g2lib/u8x8_d_fbrle.c @@ -6,8 +6,7 @@ #include "u8x8_nodemcu_hal.h" -#include -#include +#include "c_stdlib.h" static const u8x8_display_info_t u8x8_fbrle_display_info = @@ -105,7 +104,7 @@ static uint8_t u8x8_d_fbrle(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *ar uint8_t *buf = ((u8x8_tile_t *)arg_ptr)->tile_ptr; struct fbrle_line *fbrle_line; - if (!(fbrle_line = (struct fbrle_line *)malloc( fbrle_line_size ))) { + if (!(fbrle_line = (struct fbrle_line *)c_malloc( fbrle_line_size ))) { break; } @@ -148,7 +147,7 @@ static uint8_t u8x8_d_fbrle(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *ar } } - free( fbrle_line ); + c_free( fbrle_line ); } break;