[Mesa-dev] [PATCH 76/84] st/nine: Fix leak with volume dtor

Axel Davy axel.davy at ens.fr
Wed Dec 7 22:55:49 UTC 2016


The last level was not released.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/volumetexture9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c
index 4908ed7..5c83fdb 100644
--- a/src/gallium/state_trackers/nine/volumetexture9.c
+++ b/src/gallium/state_trackers/nine/volumetexture9.c
@@ -139,7 +139,7 @@ NineVolumeTexture9_dtor( struct NineVolumeTexture9 *This )
     DBG("This=%p\n", This);
 
     if (This->volumes) {
-        for (l = 0; l < This->base.base.info.last_level; ++l)
+        for (l = 0; l <= This->base.base.info.last_level; ++l)
             NineUnknown_Destroy(&This->volumes[l]->base);
         FREE(This->volumes);
     }
-- 
2.10.2



More information about the mesa-dev mailing list