diff options
author | Moonhee Choi <mh0310.choi@samsung.com> | 2017-07-03 18:17:32 +0900 |
---|---|---|
committer | Moonhee Choi <mh0310.choi@samsung.com> | 2017-07-03 18:17:32 +0900 |
commit | c2843b1c511bb7f4fb418664e5ad66a92c3cadbd (patch) | |
tree | 722582f8b9034b827f937779d5235d99d78250e1 | |
parent | 4d9e2b04057fab1e18c4b0ddb948d87fb045c28b (diff) | |
download | cairo-accepted/tizen/4.0/unified/20170816.011202.tar.gz cairo-accepted/tizen/4.0/unified/20170816.011202.tar.bz2 cairo-accepted/tizen/4.0/unified/20170816.011202.zip |
[RQ170526-01074] gl:Fix bug in _cairo_gl_pattern_texture_setup()submit/tizen_4.0_unified/20170814.115522submit/tizen_4.0/20170814.115522submit/tizen_4.0/20170811.094300submit/tizen/20170705.043917accepted/tizen/unified/20170705.163138accepted/tizen/4.0/unified/20170816.014621accepted/tizen/4.0/unified/20170816.011202
- The "image" allocated at line 786 is not freed before moving to label fail at line 803.
- It was fixed in community: https://bugs.freedesktop.org/show_bug.cgi?id=91537
Change-Id: I91833b0f7be723f050e7c1d38ae64e5f07d831fe
-rw-r--r-- | src/cairo-gl-operand.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cairo-gl-operand.c b/src/cairo-gl-operand.c index de3cee725..0d5c053a1 100644 --- a/src/cairo-gl-operand.c +++ b/src/cairo-gl-operand.c @@ -790,12 +790,18 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand, if (src_is_gl_surface) { status = _cairo_gl_context_release (ctx, status); if (unlikely (status)) + { + _cairo_surface_unmap_image (&surface->base, image); goto fail; + } /* we need to release one more time */ status = _cairo_gl_context_release (ctx, status); if (unlikely (status)) + { + _cairo_surface_unmap_image (&surface->base, image); goto fail; + } } status = _cairo_surface_offset_paint (&image->base, extents->x, extents->y, @@ -833,7 +839,7 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand, fail: cairo_surface_destroy (&surface->base); - cairo_surface_destroy (&image->base); + return status; } |