From 8f1316d0c2fa397113310f4582320ca6869676ad Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 15 Aug 2026 16:30:36 -0700 Subject: [PATCH] wayland/screencopy: fix bo double free on alloc fail in createDmabuf gbm_bo_free is already called by the WlDmaBuffer destructor --- changelog/next.md | 1 + src/wayland/buffer/dmabuf.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/next.md b/changelog/next.md index f6d5494..19638a1 100644 --- a/changelog/next.md +++ b/changelog/next.md @@ -16,3 +16,4 @@ - Fixed `Toplevel.unsetRectangle` crashing when calle. - Fixed intermittent `FileView` crashes when updating watched files. - Fixed `ColorQuantizer` deletion crashing if an operation was live. +- Fixed crashes when failing to create a `ScreencopyView`. diff --git a/src/wayland/buffer/dmabuf.cpp b/src/wayland/buffer/dmabuf.cpp index e518030..ada2874 100644 --- a/src/wayland/buffer/dmabuf.cpp +++ b/src/wayland/buffer/dmabuf.cpp @@ -799,7 +799,6 @@ WlBuffer* LinuxDmabufManager::createDmabuf( if (plane.fd < 0) { qCritical(logDmabuf) << "Failed to get gbm_bo fd for plane" << i << qt_error_string(plane.fd); params.destroy(); - gbm_bo_destroy(bo); return nullptr; }