diff options
author | Moonhee Choi <mh0310.choi@samsung.com> | 2017-09-07 15:41:09 +0900 |
---|---|---|
committer | Moonhee Choi <mh0310.choi@samsung.com> | 2017-09-07 15:41:09 +0900 |
commit | 5e01ddada8d2da756a351d3efdbcb092ac8063c9 (patch) | |
tree | 4e8a30dae56c4db2d0e425cc51d9b56635dc0c93 | |
parent | fda8e687df8f0a4924b550e2896d4a977e105fc2 (diff) | |
download | cairo-tizen_3.0.tar.gz cairo-tizen_3.0.tar.bz2 cairo-tizen_3.0.zip |
Fix Memory Leaktizen_3.0
- missing free on string buffer
Change-Id: Ifa45bb3acdc14894811d331b0a53c1fe9ccc3b48
Signed-off-by: Moonhee Choi <mh0310.choi@samsung.com>
-rw-r--r-- | src/cairo-evas-gl-context.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cairo-evas-gl-context.c b/src/cairo-evas-gl-context.c index b58bc6d46..08a32d5c6 100644 --- a/src/cairo-evas-gl-context.c +++ b/src/cairo-evas-gl-context.c @@ -277,6 +277,7 @@ cairo_evas_gl_device_create (Evas_GL *evas_gl, Evas_GL_Config *evas_cfg; cairo_evas_gl_context_t *ctx; cairo_status_t status; + const char* str = NULL; if (! evas_gl ||! evas_context) { fprintf (stderr, "cairo_evas_gl_device_create(): evas_gl or evas_context is NULL\n"); @@ -333,12 +334,15 @@ cairo_evas_gl_device_create (Evas_GL *evas_gl, return _cairo_gl_context_create_in_error (status); } - if (strstr(evas_gl_string_query (ctx->evas_gl, EVAS_GL_EXTENSIONS), - "GLX_MESA_multithread_makecurrent")) + str = evas_gl_string_query (ctx->evas_gl, EVAS_GL_EXTENSIONS); + if (str && strstr(str, "GLX_MESA_multithread_makecurrent")) ctx->has_multithread_makecurrent = TRUE; else ctx->has_multithread_makecurrent = FALSE; + if (str) + free(str); + // reset vbo_size ctx->base.vbo_size = 16 * 1024; |