summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-02 21:47:18 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-02 21:53:23 +0900
commitd42ec53154b79257ec727ad012b9bcbee900ddaf (patch)
treefc420d43e40441072b68b7e34a70a9449591a5a2 /src/modules
parent6e30535a3c39efa5ce1662e3f42753dde9c48681 (diff)
wayland_shm - clean out ptrs after free - seeing invalid mem/ptr access
enlightenment internal windows insta segv e on rpi. after much hunting it seems a fallback is happening and bunk ptrs are being used. this at least will make the problems more reliable with null ptrs.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c6
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 5c9619e..5babde2 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -479,6 +479,7 @@ _allocation_complete(Dmabuf_Buffer *b)
479 * buffer type... 479 * buffer type...
480 */ 480 */
481 _fallback(b->surface, b->w, b->h); 481 _fallback(b->surface, b->w, b->h);
482 b->surface = NULL;
482} 483}
483 484
484static void 485static void
@@ -591,12 +592,13 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags EINA_U
591 _evas_dmabuf_buffer_destroy(b); 592 _evas_dmabuf_buffer_destroy(b);
592 } 593 }
593 buf = _evas_dmabuf_buffer_init(surface, w, h); 594 buf = _evas_dmabuf_buffer_init(surface, w, h);
594 surface->buffer[i] = buf;
595 if (!buf) 595 if (!buf)
596 { 596 {
597 _fallback(surface, w, h); 597 _fallback(surface, w, h);
598 s->surf.dmabuf = NULL;
598 return; 599 return;
599 } 600 }
601 surface->buffer[i] = buf;
600 } 602 }
601} 603}
602 604
@@ -758,6 +760,8 @@ _internal_evas_dmabuf_surface_destroy(Dmabuf_Surface *surface)
758 _evas_dmabuf_buffer_destroy(surface->buffer[i]); 760 _evas_dmabuf_buffer_destroy(surface->buffer[i]);
759 761
760 free(surface->buffer); 762 free(surface->buffer);
763 surface->buffer = NULL;
764 surface->nbuf = 0;
761 free(surface); 765 free(surface);
762} 766}
763 767
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 031b90f..8a622f6 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -394,6 +394,7 @@ _evas_shm_surface_destroy(Surface *surface)
394 _shm_leaf_destroy(&surface->surf.shm->leaf[i]); 394 _shm_leaf_destroy(&surface->surf.shm->leaf[i]);
395 395
396 free(surface->surf.shm); 396 free(surface->surf.shm);
397 surface->surf.shm = NULL;
397} 398}
398 399
399void 400void