crocus: Fix memory leaks on iris_resource_create failure paths
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 27 Apr 2022 08:35:02 +0000 (01:35 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 31 Aug 2022 01:43:08 +0000 (01:43 +0000)
commit6c7916b7f665db7f5af929ed0f64206d70fccc56
treede6e3401743c82041a3d357551d6d2ef39349426
parent1db51b5af59b4a77764c087db26d8b7c12c01551
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: d8a38edc48e ("crocus: fail resource allocation properly.")
Fixes: f3630548f1d ("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>
src/gallium/drivers/crocus/crocus_resource.c