mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-14 05:34:28 -04:00
backend/drm: fix libliftoff_plane double-free
Destroying the liftoff_device invalidates all of the liftoff_planes. Destroy the liftoff_planes before the liftoff_device to fix this.
This commit is contained in:
parent
8714657d7b
commit
fffa1908af
2 changed files with 5 additions and 3 deletions
|
|
@ -109,6 +109,11 @@ static void finish(struct wlr_drm_backend *drm) {
|
|||
liftoff_output_destroy(crtc->liftoff);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < drm->num_planes; i++) {
|
||||
struct wlr_drm_plane *plane = &drm->planes[i];
|
||||
liftoff_plane_destroy(plane->liftoff);
|
||||
}
|
||||
|
||||
liftoff_device_destroy(drm->liftoff);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue