aboutsummaryrefslogtreecommitdiff
path: root/shm.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-09 08:54:39 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-09 08:54:39 +0000
commit828a57c2011eb797a9a257d124d48c641b3cac89 (patch)
treecb2539f90c8a1be1ae330c807997dfc2a98e9481 /shm.c
parentchangelog: add birger to 'contributers' for the upcoming release (diff)
parentHandle allocation failures explicitly in *_init() functions (diff)
Merge branch 'xmalloc-conversion' into master
Diffstat (limited to 'shm.c')
-rw-r--r--shm.c3
1 files changed, 2 insertions, 1 deletions
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;