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: 6a3f5c6512 ("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>
This commit is contained in:
@@ -3564,6 +3564,7 @@ egl_image_target_texture(struct gl_context *ctx,
|
||||
!(target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(texture is imported from dmabuf)", caller);
|
||||
pipe_resource_reference(&stimg.texture, NULL);
|
||||
_mesa_unlock_texture(ctx, texObj);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user