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@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8678>
This commit is contained in:
parent
46e9800408
commit
1d967132f3
|
@ -243,7 +243,7 @@ panfrost_create_surface(struct pipe_context *pipe,
|
||||||
{
|
{
|
||||||
struct pipe_surface *ps = NULL;
|
struct pipe_surface *ps = NULL;
|
||||||
|
|
||||||
ps = rzalloc(pipe, struct pipe_surface);
|
ps = CALLOC_STRUCT(pipe_surface);
|
||||||
|
|
||||||
if (ps) {
|
if (ps) {
|
||||||
pipe_reference_init(&ps->reference, 1);
|
pipe_reference_init(&ps->reference, 1);
|
||||||
|
@ -279,7 +279,7 @@ panfrost_surface_destroy(struct pipe_context *pipe,
|
||||||
{
|
{
|
||||||
assert(surf->texture);
|
assert(surf->texture);
|
||||||
pipe_resource_reference(&surf->texture, NULL);
|
pipe_resource_reference(&surf->texture, NULL);
|
||||||
ralloc_free(surf);
|
free(surf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pipe_resource *
|
static struct pipe_resource *
|
||||||
|
|
Loading…
Reference in New Issue