devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fd79e32dbd004ebe71ef6d090fe8ad7ecfdb7b12

commit fd79e32dbd004ebe71ef6d090fe8ad7ecfdb7b12
Author: Chris Michael <[email protected]>
Date:   Mon Nov 6 10:02:35 2017 -0500

    evas-wayland-shm: Do not dereference a potentially freed pointer
    
    Coverity reports that _evas_dmabuf_buffer_init function here can
    potentially free the surface that was passed into it. If that happens,
    we should not be calling the _fallback function with surface as the
    parameter as that will directly dereference the freed pointer.
    
    Fixes Coverity CID1381707
    
    @fix
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c 
b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 85ccc2a5e8..b3446b03fe 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -519,7 +519,7 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, 
uint32_t flags EINA_U
         buf = _evas_dmabuf_buffer_init(surface, w, h);
         if (!buf)
            {
-              _fallback(surface, w, h);
+              if (surface) _fallback(surface, w, h);
               s->surf.dmabuf = NULL;
               return;
            }

-- 


Reply via email to