From 9d8c3a7b828632619766ee763b18c46a0fd9d160 Mon Sep 17 00:00:00 2001 From: devsaurus Date: Wed, 5 Aug 2015 21:52:56 +0200 Subject: [PATCH] fix u8g device destructor don't free unallocated memory --- app/modules/u8g.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/modules/u8g.c b/app/modules/u8g.c index 676f3375..24d2062b 100644 --- a/app/modules/u8g.c +++ b/app/modules/u8g.c @@ -6,7 +6,6 @@ #include "auxmods.h" #include "lrotable.h" -//#include "c_string.h" #include "c_stdlib.h" #include "u8g.h" @@ -15,9 +14,7 @@ struct _lu8g_userdata_t { - u8g_t u8g; - u8g_pb_t pb; - u8g_dev_t dev; + u8g_t u8g; }; typedef struct _lu8g_userdata_t lu8g_userdata_t; @@ -969,13 +966,6 @@ static int lu8g_close_display( lua_State *L ) if ((lud = get_lud( L )) == NULL) return 0; - // free up allocated page buffer - if (lud->pb.buf != NULL) - { - c_free( lud->pb.buf ); - lud->pb.buf = NULL; - } - return 0; }