wayland-client: Handle potential NULL-deref
wayland-client: Handle potential NULL-deref

Instead, return -1 on out-of-memory.  errno will be set to ENOMEM by
the failing malloc.

mchalupa/wayland,sir-murray/wayland,mchalupa/wayland,abooij/wayland,sir-murray/wayland,abooij/wayland,bitfactor/wayland,abooij/wayland,eyolfson/wayland,eyolfson/wayland,tulcod/wayland,bitfactor/wayland,tulcod/wayland,tulcod/wayland,eyolfson/wayland,mchalupa/wayland,bitfactor/wayland,sir-murray/wayland