Fix potential memory leak
[AGL/meta-agl.git] / meta-agl-core / recipes-graphics / wayland / weston / 0001-libweston-Remove-source-repaint_timer-in-weston_comp.patch
1 From d4b46cdd3cf0b7e9eaa415fc87a4281695f2349c Mon Sep 17 00:00:00 2001
2 From: Lujin Wang <luwang@nvidia.com>
3 Date: Mon, 12 Aug 2019 12:03:29 -0700
4 Subject: [PATCH] libweston: Remove source repaint_timer in
5  weston_compositor_shutdown
6
7 Fixes a definitely lost:
8 == 56 bytes in 1 blocks are definitely lost in loss record 16 of 45
9 ==    at 0x48450F8: malloc (vg_replace_malloc.c:309)
10 ==    by 0x4B55E93: wl_event_loop_add_timer (event-loop.c:197)
11 ==    by 0x4126CF: weston_compositor_create (in /usr/local/bin/weston)
12 ==    by 0x409997: main (in /usr/local/bin/weston)
13
14 Signed-off-by: Lujin Wang <luwang@nvidia.com>
15 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
16 ---
17  libweston/compositor.c | 1 +
18  1 file changed, 1 insertion(+)
19
20 diff --git a/libweston/compositor.c b/libweston/compositor.c
21 index c2da3a48c..90321e860 100644
22 --- a/libweston/compositor.c
23 +++ b/libweston/compositor.c
24 @@ -7733,6 +7733,7 @@ weston_compositor_shutdown(struct weston_compositor *ec)
25         struct weston_output *output, *next;
26  
27         wl_event_source_remove(ec->idle_source);
28 +       wl_event_source_remove(ec->repaint_timer);
29  
30         /* Destroy all outputs associated with this compositor */
31         wl_list_for_each_safe(output, next, &ec->output_list, link)
32 -- 
33 GitLab
34