[virglrenderer-devel] [PATCH] vrend: fix memory leak in int blit context

Li Qiang liq3ea at gmail.com
Tue Dec 27 02:24:13 UTC 2016


The 'blit_ctx->initialised' is not setted to true.
Every time init blit context, it will create a new
'blit_ctx->gl_context' thus causing a memory leak.
This patch avoid this.

Signed-off-by: Li Qiang <liq3ea at gmail.com>
---
 src/vrend_blitter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vrend_blitter.c b/src/vrend_blitter.c
index 86c2061..035c409 100644
--- a/src/vrend_blitter.c
+++ b/src/vrend_blitter.c
@@ -361,6 +361,7 @@ static void vrend_renderer_init_blit_ctx(struct vrend_blitter_ctx *blit_ctx)
       return;
    }
 
+   blit_ctx->initialised = true;
    ctx_params.shared = true;
    ctx_params.major_ver = VREND_GL_VER_MAJOR;
    ctx_params.minor_ver = VREND_GL_VER_MINOR;
-- 
2.7.4



More information about the virglrenderer-devel mailing list