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>
This commit is contained in:
committed by
Quentin Glidic
parent
745e647f18
commit
fec723ef56
@@ -301,7 +301,7 @@ wayland_output_get_shm_buffer(struct wayland_output *output)
|
|||||||
if (sb == NULL) {
|
if (sb == NULL) {
|
||||||
weston_log("could not zalloc %zu memory for sb: %m\n", sizeof *sb);
|
weston_log("could not zalloc %zu memory for sb: %m\n", sizeof *sb);
|
||||||
close(fd);
|
close(fd);
|
||||||
free(data);
|
munmap(data, height * stride);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user