This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/145/head
in repository efl.

View the commit online.

commit f4c7a6c35e5767fbc76b413d1a4bbafdd9b63c90
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Nov 15 18:38:59 2026 -0600

    evas:gl_drm: free the dmabuf EGLImage without reading the wl_surface arm
    
    _native_cb_free() destroyed the EGLImage of a dmabuf native surface only
    if ns_data.wl_surface.surface was set. That is the other arm of the
    union: for a dmabuf it reads the height and format of the plane
    attributes. They are never both zero in practice, so the image was
    freed, but only by luck. Check the dmabuf image itself.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/modules/evas/engines/gl_drm/evas_engine.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index 8cef64837e..ea12deecf3 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -977,13 +977,10 @@ _native_cb_free(void *image)
      {
         wlid = n->ns_data.wl_surface_dmabuf.resource;
         eina_hash_del(img->native.shared->native_wl_hash, &wlid, img);
-        if (n->ns_data.wl_surface.surface)
+        if (glsym_evas_gl_common_eglDestroyImage && n->ns_data.wl_surface_dmabuf.image)
           {
-             if (glsym_evas_gl_common_eglDestroyImage && n->ns_data.wl_surface_dmabuf.image)
-               {
-                  glsym_evas_gl_common_eglDestroyImage(img->native.disp, n->ns_data.wl_surface_dmabuf.image);
-                  GLERRV("eglDestroyImage() failed.");
-               }
+             glsym_evas_gl_common_eglDestroyImage(img->native.disp, n->ns_data.wl_surface_dmabuf.image);
+             GLERRV("eglDestroyImage() failed.");
           }
      }
    else if (n->ns.type == EVAS_NATIVE_SURFACE_WL)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to