mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
util: set errno in wl_map_insert_at()
And add errno checks in callers, where it seems to be necessary. Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
This commit is contained in:
parent
03e8a1f84b
commit
884d5fe3ab
3 changed files with 18 additions and 9 deletions
|
|
@ -485,7 +485,10 @@ wl_proxy_create_for_id(struct wl_proxy *factory,
|
|||
proxy->refcount = 1;
|
||||
proxy->version = factory->version;
|
||||
|
||||
wl_map_insert_at(&display->objects, 0, id, proxy);
|
||||
if (wl_map_insert_at(&display->objects, 0, id, proxy) == -1) {
|
||||
free(proxy);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return proxy;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue