From db0781471b92ccbc34338e7cd7507897cf493048 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 31 Jul 2019 14:05:56 +0200 Subject: [PATCH] host/gop.c: free graphics context in draw() function ==19621== 160 bytes in 1 blocks are definitely lost in loss record 3 of 3 ==19621== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299) ==19621== by 0x4E5926B: XCreateGC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0) ==19621== by 0x10F852: draw (in /home/lsartre/perso/efiwrapper/host/efiwrapper_host-eng) ==19621== by 0x517F4A3: start_thread (pthread_create.c:456) Signed-off-by: leo --- host/gop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/host/gop.c b/host/gop.c index 1322e92..05d8d95 100644 --- a/host/gop.c +++ b/host/gop.c @@ -252,6 +252,7 @@ static void *draw(void *arg) XDestroyImage(gop->img); gop->img = NULL; } + XFreeGC(gop->display, gop->gc); XUnmapWindow(gop->display, gop->win); XDestroyWindow(gop->display, gop->win); XFree(vi);