From: Christian König Date: Sat, 8 Mar 2014 13:52:25 +0000 (+0100) Subject: radeonsi: fix freeing descriptor buffers X-Git-Tag: upstream/10.3~3194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a402359fdb3e82771e36c47bbf2b99a2ecc4d03;p=platform%2Fupstream%2Fmesa.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 9b10d01..06b29d4 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); }