Mesa (staging/21.0): panfrost: Use normal malloc/free instead of ralloc for surfaces
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 26 17:20:07 UTC 2021
Module: Mesa
Branch: staging/21.0
Commit: 85bb7eff533156e2c87560288236be1ae60ff0ba
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=85bb7eff533156e2c87560288236be1ae60ff0ba
Author: Icecream95 <ixn at disroot.org>
Date: Sun Jan 24 20:53:36 2021 +1300
panfrost: Use normal malloc/free instead of ralloc for surfaces
Fixes a double-free in some Qt5 WebEngine apps (e.g. ghostwriter).
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8678>
(cherry picked from commit 1d967132f3c4aefa72224d1029aa64a34053bf6b)
---
.pick_status.json | 2 +-
src/gallium/drivers/panfrost/pan_resource.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index c7cbf4cf97f..80c48bdcf72 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -274,7 +274,7 @@
"description": "panfrost: Use normal malloc/free instead of ralloc for surfaces",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 24b7c85e9a0..d9f61759f6f 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -241,7 +241,7 @@ panfrost_create_surface(struct pipe_context *pipe,
{
struct pipe_surface *ps = NULL;
- ps = rzalloc(pipe, struct pipe_surface);
+ ps = CALLOC_STRUCT(pipe_surface);
if (ps) {
pipe_reference_init(&ps->reference, 1);
@@ -277,7 +277,7 @@ panfrost_surface_destroy(struct pipe_context *pipe,
{
assert(surf->texture);
pipe_resource_reference(&surf->texture, NULL);
- ralloc_free(surf);
+ free(surf);
}
static struct pipe_resource *
More information about the mesa-commit
mailing list