summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-10-20 17:51:22 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-10-20 17:51:44 -0400
commitfe10889ec7c16ab8b34a37730a5ddda160ab3f24 (patch)
treee959193259eaee99b106079f112833504adaacf6 /src/lib/ecore_wayland
parentf4bd830e22a0c720e27654bb1f405bbed7efc083 (diff)
ecore-wayland: plug some trivial leaks
Diffstat (limited to 'src/lib/ecore_wayland')
-rw-r--r--src/lib/ecore_wayland/ecore_wl.c4
-rw-r--r--src/lib/ecore_wayland/ecore_wl_input.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index 8d020cdbfe..f6e71097fe 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -554,6 +554,8 @@ _ecore_wl_shutdown(Eina_Bool close)
554 wl_compositor_destroy(_ecore_wl_disp->wl.compositor); 554 wl_compositor_destroy(_ecore_wl_disp->wl.compositor);
555 if (_ecore_wl_disp->wl.subcompositor) 555 if (_ecore_wl_disp->wl.subcompositor)
556 wl_subcompositor_destroy(_ecore_wl_disp->wl.subcompositor); 556 wl_subcompositor_destroy(_ecore_wl_disp->wl.subcompositor);
557 if (_ecore_wl_disp->cursor_theme)
558 wl_cursor_theme_destroy(_ecore_wl_disp->cursor_theme);
557 if (_ecore_wl_disp->wl.display) 559 if (_ecore_wl_disp->wl.display)
558 { 560 {
559 wl_registry_destroy(_ecore_wl_disp->wl.registry); 561 wl_registry_destroy(_ecore_wl_disp->wl.registry);
@@ -727,7 +729,7 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
727 729
728 if (ewd->input) 730 if (ewd->input)
729 _ecore_wl_input_setup(ewd->input); 731 _ecore_wl_input_setup(ewd->input);
730 else 732 else if (!ewd->cursor_theme)
731 { 733 {
732 ewd->cursor_theme = 734 ewd->cursor_theme =
733 wl_cursor_theme_load(NULL, ECORE_WL_DEFAULT_CURSOR_SIZE, 735 wl_cursor_theme_load(NULL, ECORE_WL_DEFAULT_CURSOR_SIZE,
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 9bdd93283e..f1892359ae 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -224,6 +224,8 @@ ecore_wl_input_cursor_size_set(Ecore_Wl_Input *input, const int size)
224 224
225 EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm); 225 EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm);
226 226
227 if (input->display->cursor_theme)
228 wl_cursor_theme_destroy(input->display->cursor_theme);
227 input->display->cursor_theme = 229 input->display->cursor_theme =
228 wl_cursor_theme_load(NULL, input->cursor_size, input->display->wl.shm); 230 wl_cursor_theme_load(NULL, input->cursor_size, input->display->wl.shm);
229} 231}
@@ -239,6 +241,8 @@ ecore_wl_input_cursor_theme_name_set(Ecore_Wl_Input *input, const char *cursor_t
239 241
240 EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm); 242 EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm);
241 243
244 if (input->display->cursor_theme)
245 wl_cursor_theme_destroy(input->display->cursor_theme);
242 input->display->cursor_theme = 246 input->display->cursor_theme =
243 wl_cursor_theme_load(input->cursor_theme_name, input->cursor_size, 247 wl_cursor_theme_load(input->cursor_theme_name, input->cursor_size,
244 input->display->wl.shm); 248 input->display->wl.shm);