From c617c669e9fce59905915c3ba1053f535add6a06 Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Fri, 1 Nov 2013 13:20:15 +0100 Subject: [PATCH] lavd/xv: free graphics context Valgrind detects mem leak from XCreateGC. Free it with XFreeGC. Signed-off-by: Lukasz Marek Signed-off-by: Stefano Sabatini --- libavdevice/xv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavdevice/xv.c b/libavdevice/xv.c index 65f2f72224..3b377f8bdb 100644 --- a/libavdevice/xv.c +++ b/libavdevice/xv.c @@ -181,6 +181,7 @@ static int xv_write_trailer(AVFormatContext *s) XShmDetach(xv->display, &xv->yuv_shminfo); shmdt(xv->yuv_image->data); XFree(xv->yuv_image); + XFreeGC(xv->display, xv->gc); XCloseDisplay(xv->display); return 0; }