drm: Don't leak planes

This commit is contained in:
Aleix Pol 2020-04-08 16:12:03 +02:00
parent fa654bda59
commit 16fe8dbd88

View file

@ -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<drmModePlane> kplane(drmModeGetPlane(m_fd, planeResources->planes[i]));
DrmPlane *p = new DrmPlane(kplane->plane_id, m_fd);
if (p->atomicInit()) {
m_planes << p;