mesa: fix refcnt imbalance related to egl_image_target_texture()
authorPatrick Lerda <patrick9876@free.fr>
Mon, 8 May 2023 16:02:44 +0000 (18:02 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 May 2023 13:28:42 +0000 (13:28 +0000)
commit83cd7d23a26d3cbd1af4805e95c4e588950f0fd5
treea8eda39d58e37f3607b67305ba9f208f19743bbd
parentc8fa8672e48d7dd9e756852cc26e7ac4fa995ec8
mesa: fix refcnt imbalance related to egl_image_target_texture()

Indeed, the locally allocated "stimg" reference was not freed
on a specific code path.

For instance, this issue is triggered on radeonsi or r600 with:
"piglit/bin/egl-ext_egl_image_storage -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 6a3f5c65128b ("mesa: simplify st_egl_image binding process for texture storage")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23165>
src/mesa/main/teximage.c