Module: Mesa
Branch: staging/23.0
Commit: 1b6fa2f4070a8e25f7d9a5136375726beb7e9f09
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b6fa2f4070a8e25f7d9a5136375726beb7e9f09

Author: Iván Briano <[email protected]>
Date:   Mon Oct 10 14:45:58 2022 -0700

vulkan/wsi/display: do not dereference a NULL pointer

Fixes dEQP-VK.wsi.direct_drm.swapchain.simulate_oom.*

Cc: mesa-stable

Reviewed-By: Mike Blumenkrantz <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19025>
(cherry picked from commit eadc64ab24842f478b4d31396c9b2900fc1d3361)

---

 .pick_status.json                   | 2 +-
 src/vulkan/wsi/wsi_common_display.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index c4a3682ef81..cf340f879fd 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -913,7 +913,7 @@
         "description": "vulkan/wsi/display: do not dereference a NULL pointer",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/vulkan/wsi/wsi_common_display.c 
b/src/vulkan/wsi/wsi_common_display.c
index 2bf4dee998f..c6f1a1568b4 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -305,6 +305,9 @@ wsi_display_alloc_connector(struct wsi_display *wsi,
    if (!connector)
       return NULL;
 
+   if (!connector)
+      return NULL;
+
    connector->id = connector_id;
    connector->wsi = wsi;
    connector->active = false;

Reply via email to