summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-03 04:19:29 -0700
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-17 10:15:05 +0900
commite1b72ff0ee19a0983607a4ccfc99fc06635a821d (patch)
tree22c28a4d1ecd937d82ee564fc3834fd1a2396c45
parenta045f296aec44357ccc47a37b8263b0659c9cb59 (diff)
downloadwayland-ivi-extension-e1b72ff0ee19a0983607a4ccfc99fc06635a821d.tar.gz
ivi-cotroller: Avoid double free of surface.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rwxr-xr-xweston-ivi-shell/src/ivi-controller.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
index f9692ba..8cfd9ed 100755
--- a/weston-ivi-shell/src/ivi-controller.c
+++ b/weston-ivi-shell/src/ivi-controller.c
@@ -153,6 +153,7 @@ struct ivishell {
int previous_state;
int event_restriction;
};
+static void surface_event_remove(struct ivi_layout_surface *, void *);
static void
destroy_ivicontroller_surface(struct wl_resource *resource)
@@ -1127,14 +1128,7 @@ surface_event_content(struct ivi_layout_surface *layout_surface, int32_t content
uint32_t id_surface = 0;
if (content == 0) {
- id_surface = ivi_layout_getIdOfSurface(layout_surface);
-
- wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
- if (id_surface != ctrlsurf->id_surface) {
- continue;
- }
- ivi_controller_surface_send_destroyed(ctrlsurf->resource);
- }
+ surface_event_remove(layout_surface, userdata);
}
}