mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 18:48:28 +02:00
crocus: Fix memory leaks on iris_resource_create failure paths
We've already allocated the pipe resource, so we ought to free it before returning. Fixes:d8a38edc48("crocus: fail resource allocation properly.") Fixes:f3630548f1("crocus: initial gallium driver for Intel gfx 4-7") Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18311>
This commit is contained in:
parent
1db51b5af5
commit
6c7916b7f6
1 changed files with 2 additions and 2 deletions
|
|
@ -695,12 +695,12 @@ crocus_resource_create_with_modifiers(struct pipe_screen *pscreen,
|
|||
if (templ->usage == PIPE_USAGE_STAGING &&
|
||||
templ->bind == PIPE_BIND_DEPTH_STENCIL &&
|
||||
devinfo->ver < 6)
|
||||
return NULL;
|
||||
goto fail;
|
||||
|
||||
const bool isl_surf_created_successfully =
|
||||
crocus_resource_configure_main(screen, res, templ, modifier, 0);
|
||||
if (!isl_surf_created_successfully)
|
||||
return NULL;
|
||||
goto fail;
|
||||
|
||||
const char *name = "miptree";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue