Skip to content

Commit

Permalink
host/gop.c: free graphics context in draw() function
Browse files Browse the repository at this point in the history
==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 <[email protected]>
  • Loading branch information
leo committed Jul 31, 2019
1 parent 8feee46 commit db07814
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions host/gop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit db07814

Please sign in to comment.