diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp index c6d185de75..7c0d176f19 100644 --- a/src/backends/drm/drm_backend.cpp +++ b/src/backends/drm/drm_backend.cpp @@ -642,10 +642,6 @@ std::optional DrmBackend::testCreateDmaBuf(const QSize &size, quin } auto ret = dmaBufParamsForBo(bo); - // We are just testing to know it works and check the modifier, no need to keep the fd - for (int i = 0, c = gbm_bo_get_plane_count(bo); i < c; ++i) { - close(gbm_bo_get_fd_for_plane(bo, i)); - } gbm_bo_destroy(bo); return ret; } diff --git a/src/backends/wayland/wayland_backend.cpp b/src/backends/wayland/wayland_backend.cpp index 599dd234c7..313efc5abd 100644 --- a/src/backends/wayland/wayland_backend.cpp +++ b/src/backends/wayland/wayland_backend.cpp @@ -1036,10 +1036,6 @@ std::optional WaylandBackend::testCreateDmaBuf(const QSize &size, } auto ret = dmaBufParamsForBo(bo); - // We are just testing to know it works and check the modifier, no need to keep the fd - for (int i = 0, c = gbm_bo_get_plane_count(bo); i < c; ++i) { - close(gbm_bo_get_fd_for_plane(bo, i)); - } gbm_bo_destroy(bo); return ret; }