compositor-wayland: Properly dealloc mmap data using munmap

Signed-off-by: Raúl Peñacoba <raul.mikaop.zelda@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
dev
Raúl Peñacoba 8 years ago committed by Quentin Glidic
parent 745e647f18
commit fec723ef56
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 2
      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;
}

Loading…
Cancel
Save