Module: Mesa
Branch: staging/23.3
Commit: 668577272deca2a9b5a9b52e1c46bfd71001fce7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=668577272deca2a9b5a9b52e1c46bfd71001fce7

Author: Sil Vilerino <[email protected]>
Date:   Fri Dec  1 13:15:35 2023 -0500

d3d12: Fix screen->winsys leak in d3d12_screen

Reviewed-by: Jesse Natalie <[email protected]>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
(cherry picked from commit 81c8e89ff8e846839fffc1d103b2080bef5c1b5c)

---

 .pick_status.json                          | 2 +-
 src/gallium/drivers/d3d12/d3d12_screen.cpp | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 4e06969581a..ce9fcb9970d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2524,7 +2524,7 @@
         "description": "d3d12: Fix screen->winsys leak in d3d12_screen",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null,
         "notes": null
diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp 
b/src/gallium/drivers/d3d12/d3d12_screen.cpp
index 4377361f826..192d4d96e18 100644
--- a/src/gallium/drivers/d3d12/d3d12_screen.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp
@@ -735,6 +735,10 @@ d3d12_deinit_screen(struct d3d12_screen *screen)
       screen->dev->Release();
       screen->dev = nullptr;
    }
+   if (screen->winsys) {
+      screen->winsys->destroy(screen->winsys);
+      screen->winsys = nullptr;
+   }
 }
 
 void

Reply via email to