diff options
author | Versus Void <versusvoid@gmail.com> | 2017-10-05 20:01:56 +0000 |
---|---|---|
committer | Versus Void <versusvoid@gmail.com> | 2017-10-05 20:01:56 +0000 |
commit | c5df6ca900cb445b88ede7e0ea3bb3a9042b5b6f (patch) | |
tree | e9919a6c33e5827b53691331e79aa7a5a24524ab /backend/drm/drm.c | |
parent | edadbc7c7f88670afdbabd05a6027c438415c3db (diff) |
Fix memory leaks
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r-- | backend/drm/drm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1a5fea9f..fc376b54 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -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); } |