From: Christian König Date: Sat, 8 Mar 2014 13:52:25 +0000 (+0100) Subject: radeonsi: fix freeing descriptor buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a402359fdb3e82771e36c47bbf2b99a2ecc4d03;p=mesa.git radeonsi: fix freeing descriptor buffers 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 --- 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); }