From fec723ef565aa0586ad01ea6574232739b5864f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Pe=C3=B1acoba?= Date: Wed, 29 Mar 2017 22:23:07 +0200 Subject: [PATCH] compositor-wayland: Properly dealloc mmap data using munmap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raúl Peñacoba Reviewed-by: Quentin Glidic --- libweston/compositor-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }