Skip to content

Commit

Permalink
fix(platform): fbapp driver memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Sep 16, 2024
1 parent 61a32bb commit 2d2f8af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/platform/src/linux/fb_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ static void fb_app_init_root_window(void)
fbapp.screen_height);
}

static void fb_app_destroy_root_window(void)
{
app_window_t *wnd = &fbapp.window;

list_destroy(&wnd->rects, free);
}

static void fb_app_init_canvas(void)
{
fbapp.canvas.width = fbapp.screen_width;
Expand Down Expand Up @@ -491,6 +498,7 @@ static int fb_app_destroy(void)
pd_canvas_destroy(&fbapp.window.canvas);
break;
}
fb_app_destroy_root_window();
close(fbapp.fb.dev_fd);
fbapp.fb.mem = NULL;
fbapp.fb.mem_len = 0;
Expand Down

0 comments on commit 2d2f8af

Please sign in to comment.