diff options
Diffstat (limited to 'src/compositor-wayland.c')
-rw-r--r-- | src/compositor-wayland.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index f35db9c3..67f15be9 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -256,6 +256,12 @@ wayland_output_get_shm_buffer(struct wayland_output *output) } sb = zalloc(sizeof *sb); + if (sb == NULL) { + weston_log("could not zalloc %ld memory for sb: %m\n", sizeof *sb); + close(fd); + free(data); + return NULL; + } sb->output = output; wl_list_init(&sb->free_link); |