wl text input - handle out of mem and free half done struct

stgruct we alloced is not freed if a child element setup fails...
fixes a technical leak. coverity found it.

fix CID 1403931
This commit is contained in:
Carsten Haitzler 2019-08-06 17:42:42 +01:00
parent b03c0739db
commit 3c7d93059b
1 changed files with 1 additions and 0 deletions

View File

@ -793,6 +793,7 @@ _e_text_input_manager_cb_text_input_create(struct wl_client *client, struct wl_r
1, id);
if (!text_input->resource)
{
free(text_input);
wl_client_post_no_memory(client);
ERR("could not create wl_resource for text input");
return;