diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-06-21 17:34:25 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-06-21 17:37:45 +0300 |
commit | 8d2fa15e9d7c07f9230f20deffd6ca4ba1078853 (patch) | |
tree | c5ba5a69e720020a9284eecb2d63def1b68f4e27 | |
parent | ec8b49c93f869010e360bec501d61c18089fbc61 (diff) |
xdg-toplevel: post no memory on strdup() fail
-rw-r--r-- | types/xdg_shell/wlr_xdg_toplevel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/types/xdg_shell/wlr_xdg_toplevel.c b/types/xdg_shell/wlr_xdg_toplevel.c index f929508f..dee2571f 100644 --- a/types/xdg_shell/wlr_xdg_toplevel.c +++ b/types/xdg_shell/wlr_xdg_toplevel.c @@ -157,6 +157,7 @@ static void xdg_toplevel_handle_set_title(struct wl_client *client, tmp = strdup(title); if (tmp == NULL) { + wl_resource_post_no_memory(resource); return; } @@ -173,6 +174,7 @@ static void xdg_toplevel_handle_set_app_id(struct wl_client *client, tmp = strdup(app_id); if (tmp == NULL) { + wl_resource_post_no_memory(resource); return; } |