mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-23 06:59:44 -05:00
xdg-toplevel: post no memory on strdup() fail
This commit is contained in:
parent
ec8b49c93f
commit
8d2fa15e9d
1 changed files with 2 additions and 0 deletions
|
|
@ -157,6 +157,7 @@ static void xdg_toplevel_handle_set_title(struct wl_client *client,
|
||||||
|
|
||||||
tmp = strdup(title);
|
tmp = strdup(title);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
|
wl_resource_post_no_memory(resource);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -173,6 +174,7 @@ static void xdg_toplevel_handle_set_app_id(struct wl_client *client,
|
||||||
|
|
||||||
tmp = strdup(app_id);
|
tmp = strdup(app_id);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
|
wl_resource_post_no_memory(resource);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue