discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=3eecf5904c8527acbd63a0ea2d19f5c0a601e3a7
commit 3eecf5904c8527acbd63a0ea2d19f5c0a601e3a7 Author: Derek Foreman <der...@osg.samsung.com> Date: Thu Mar 31 13:08:38 2016 -0500 wayland: Don't leak a clipboard source if adding fd handler fails Reviewed-by: Mike Blumenkrantz <zm...@osg.samsung.com> --- src/bin/e_comp_wl_data.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 0e3e476..420b784 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -940,7 +940,12 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd ecore_main_fd_handler_add(fd, ECORE_FD_READ, _e_comp_wl_clipboard_source_save, e_comp->wl_comp_data, NULL, NULL); - if (!source->fd_handler) return NULL; + if (!source->fd_handler) + { + _mime_types_free(&source->data_source); + free(source); + return NULL; + } } source->fd = fd; --