wayland: Don't leak a clipboard source if adding fd handler fails
Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
This commit is contained in:
parent
2bf2772712
commit
6007a51f17
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue