diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index a76dd08e..14f2c8db 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -301,7 +301,7 @@ wayland_output_get_shm_buffer(struct wayland_output *output) if (sb == NULL) { weston_log("could not zalloc %zu memory for sb: %m\n", sizeof *sb); close(fd); - free(data); + munmap(data, height * stride); return NULL; }