diff options
author | Bryce Harrington <bryce@osg.samsung.com> | 2016-02-11 16:42:49 -0800 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2016-03-09 22:54:54 -0800 |
commit | 0d1a6223751242387f1fe62c8da508d6035d7fbd (patch) | |
tree | 2b0aa6fbd816b21b1de78595300da67dfe09a614 /clients/fullscreen.c | |
parent | cd9424ef2a8face5d64b086bc55ab4e70e077beb (diff) | |
download | weston-0d1a6223751242387f1fe62c8da508d6035d7fbd.tar.gz |
clients: Use zalloc
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'clients/fullscreen.c')
-rw-r--r-- | clients/fullscreen.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clients/fullscreen.c b/clients/fullscreen.c index 653372a3..e2e6477f 100644 --- a/clients/fullscreen.c +++ b/clients/fullscreen.c @@ -36,6 +36,7 @@ #include <wayland-client.h> #include "window.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" +#include "shared/zalloc.h" struct fs_output { struct wl_list link; @@ -460,7 +461,11 @@ output_handler(struct output *output, void *data) if (fsout->output == output) return; - fsout = calloc(1, sizeof *fsout); + fsout = zalloc(sizeof *fsout); + if (fsout == NULL) { + fprintf(stderr, "out of memory in output_handler\n"); + return; + } fsout->output = output; wl_list_insert(&fullscreen->output_list, &fsout->link); } |