clients: Use zalloc
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/clients/fullscreen.c b/clients/fullscreen.c
index 653372a..e2e6477 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 @@
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);
}