set free'd pointer to NULL

This commit is contained in:
devsaurus 2015-02-25 23:17:08 +01:00
parent 2cfb86b5b5
commit 7ae293d566
1 changed files with 7 additions and 4 deletions

View File

@ -1002,7 +1002,10 @@ static int lu8g_close_display( lua_State *L )
// free up allocated page buffer // free up allocated page buffer
if (lud->pb.buf != NULL) if (lud->pb.buf != NULL)
{
c_free( lud->pb.buf ); c_free( lud->pb.buf );
lud->pb.buf = NULL;
}
return 0; return 0;
} }