mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-12 13:29:45 -05:00
Fix memory leaks
This commit is contained in:
parent
edadbc7c7f
commit
c5df6ca900
9 changed files with 23 additions and 6 deletions
|
|
@ -169,6 +169,19 @@ void wlr_drm_resources_free(struct wlr_drm_backend *drm) {
|
|||
drmModeDestroyPropertyBlob(drm->fd, crtc->mode_id);
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; i < drm->num_planes; ++i) {
|
||||
struct wlr_drm_plane *plane = &drm->planes[i];
|
||||
if (plane->cursor_bo) {
|
||||
gbm_bo_destroy(plane->cursor_bo);
|
||||
}
|
||||
if (plane->wlr_tex) {
|
||||
wlr_texture_destroy(plane->wlr_tex);
|
||||
}
|
||||
if (plane->wlr_rend) {
|
||||
wlr_renderer_destroy(plane->wlr_rend);
|
||||
}
|
||||
}
|
||||
|
||||
free(drm->crtcs);
|
||||
free(drm->planes);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue