[PATCH 3/9] etnaviv: clear out next pointer when allocating resource
Lucas Stach
l.stach at pengutronix.de
Mon Jul 9 16:02:34 UTC 2018
We copy the template resource content into the newly allocated resource.
If the template derived from a planar resource this leads to a non reference
counted copy of the next resource pointer. Make sure to clear this out when
allocating a new resource.
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
src/gallium/drivers/etnaviv/etnaviv_resource.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index 41688dd340c2..6d68a890c7b9 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -269,6 +269,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
return NULL;
rsc->base = *templat;
+ rsc->base.next = NULL;
rsc->base.screen = pscreen;
rsc->base.nr_samples = nr_samples;
rsc->layout = layout;
--
2.18.0
More information about the etnaviv
mailing list