From 6a402359fdb3e82771e36c47bbf2b99a2ecc4d03 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Sat, 8 Mar 2014 14:52:25 +0100 Subject: [PATCH] radeonsi: fix freeing descriptor buffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit That structure member is a pointer, so the loop with the Elements macro only freed up the first entry. Signed-off-by: Christian König Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_descriptors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 9b10d011b9c..06b29d42b8b 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -387,7 +387,7 @@ static void si_release_buffer_resources(struct si_buffer_resources *buffers) { int i; - for (i = 0; i < Elements(buffers->buffers); i++) { + for (i = 0; i < buffers->num_buffers; i++) { pipe_resource_reference(&buffers->buffers[i], NULL); } -- 2.30.2