vulkan/wsi/x11: Don't leak shm_reply if we don't have dri3 or present

Fixes: b5c390c113 ("vulkan/wsi: add support for detecting mit-shm pixmaps.")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17388>
(cherry picked from commit 5abc05f1df)
This commit is contained in:
Jason Ekstrand 2022-07-06 19:30:11 -05:00 committed by Dylan Baker
parent 2b157e92d7
commit fcb327dd37
2 changed files with 3 additions and 2 deletions

View file

@ -1984,7 +1984,7 @@
"description": "vulkan/wsi/x11: Don't leak shm_reply if we don't have dri3 or present",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "b5c390c113d3f23af49f8bf5a601474620ae4eb1"
},

View file

@ -302,7 +302,6 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
free(error);
}
}
free(shm_reply);
}
free(dri3_reply);
@ -310,6 +309,8 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
free(randr_reply);
free(amd_reply);
free(nv_reply);
if (wsi_dev->sw)
free(shm_reply);
return wsi_conn;
}