From 16fe8dbd88d892edb4129845024583cfead9f2fa Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 8 Apr 2020 16:12:03 +0200 Subject: [PATCH] drm: Don't leak planes --- plugins/platforms/drm/drm_backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/platforms/drm/drm_backend.cpp b/plugins/platforms/drm/drm_backend.cpp index e5bad20442..48a69ad43b 100644 --- a/plugins/platforms/drm/drm_backend.cpp +++ b/plugins/platforms/drm/drm_backend.cpp @@ -298,7 +298,7 @@ void DrmBackend::openDrm() // create the plane objects for (unsigned int i = 0; i < planeResources->count_planes; ++i) { - drmModePlane *kplane = drmModeGetPlane(m_fd, planeResources->planes[i]); + DrmScopedPointer kplane(drmModeGetPlane(m_fd, planeResources->planes[i])); DrmPlane *p = new DrmPlane(kplane->plane_id, m_fd); if (p->atomicInit()) { m_planes << p;