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 <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-11-06 10:02:35 -05:00
parent de1e18ef7d
commit fd79e32dbd
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}