[PATCH weston] compositor-wayland: Properly dealloc mmap data using munmap
Raúl Peñacoba
raul.mikaop.zelda at gmail.com
Wed Mar 29 20:23:07 UTC 2017
Signed-off-by: Raúl Peñacoba <raul.mikaop.zelda at gmail.com>
---
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;
}
--
2.12.1
More information about the wayland-devel
mailing list