fix u8g device destructor

don't free unallocated memory
This commit is contained in:
devsaurus 2015-08-05 21:52:56 +02:00
parent 9e6c62aa4d
commit 9d8c3a7b82
1 changed files with 1 additions and 11 deletions

View File

@ -6,7 +6,6 @@
#include "auxmods.h"
#include "lrotable.h"
//#include "c_string.h"
#include "c_stdlib.h"
#include "u8g.h"
@ -16,8 +15,6 @@
struct _lu8g_userdata_t
{
u8g_t u8g;
u8g_pb_t pb;
u8g_dev_t dev;
};
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;
}