From 7a77958ba20c2b344be5e66e69e2f212a4bbf6b3 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Sat, 8 Aug 2020 20:34:30 +0100 Subject: Convert most dynamic allocations to use functions from xmalloc.h --- shm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shm.c') diff --git a/shm.c b/shm.c index 317bc9c9..e4d3378e 100644 --- a/shm.c +++ b/shm.c @@ -23,6 +23,7 @@ #define LOG_ENABLE_DBG 0 #include "log.h" #include "macros.h" +#include "xmalloc.h" #define TIME_SCROLL 0 @@ -150,7 +151,7 @@ instantiate_offset(struct wl_shm *shm, struct buffer *buf, off_t new_offset) void *mmapped = MAP_FAILED; struct wl_buffer *wl_buf = NULL; - pixman_image_t **pix = calloc(buf->pix_instances, sizeof(*pix)); + pixman_image_t **pix = xcalloc(buf->pix_instances, sizeof(*pix)); mmapped = (uint8_t *)buf->real_mmapped + new_offset; -- cgit v1.3