xwayland: fix a realloc OOM error case

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(Cherry picked from commit 7c25439f)
3 jobs for server-1.20-branch in 4 minutes and 55 seconds (queued for 1 second)
Status Job ID Name Coverage
  Docker Image
passed #216338
debian-testing

00:00:27

 
  Build And Test
passed #216339
autotools-build-and-test

00:04:28

passed #216340
meson-build-and-test

00:01:08