Skip to content
Commit c13a65fd authored by David Herrmann's avatar David Herrmann Committed by Kristian Høgsberg
Browse files

wayland-util: return 0 on OOM in wl_map_insert_new()



If we cannot increase the array for new entries, we now return 0 instead
of accessing invalid memory.

krh: Edited to return 0 on failure instead.  In the initialization path,
we call wl_map_insert_new() to insert NULL at index 0, which also returns
0 but not as an error.  Since we do that up front, every other case of
returning 0 is an unambiguous error.

Signed-off-by: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
parent 0d5850e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment