Skip to content

Commit 2d2f8af

Browse files
committed
fix(platform): fbapp driver memory leak
1 parent 61a32bb commit 2d2f8af

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/platform/src/linux/fb_app.c

+8
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ static void fb_app_init_root_window(void)
153153
fbapp.screen_height);
154154
}
155155

156+
static void fb_app_destroy_root_window(void)
157+
{
158+
app_window_t *wnd = &fbapp.window;
159+
160+
list_destroy(&wnd->rects, free);
161+
}
162+
156163
static void fb_app_init_canvas(void)
157164
{
158165
fbapp.canvas.width = fbapp.screen_width;
@@ -491,6 +498,7 @@ static int fb_app_destroy(void)
491498
pd_canvas_destroy(&fbapp.window.canvas);
492499
break;
493500
}
501+
fb_app_destroy_root_window();
494502
close(fbapp.fb.dev_fd);
495503
fbapp.fb.mem = NULL;
496504
fbapp.fb.mem_len = 0;

0 commit comments

Comments
 (0)