From 76e392d85239718e6a7b20c914b4827db2828b40 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Mon, 5 Dec 2016 00:12:07 +0100 Subject: st/nine: Fix leak with cubetexture dtor The last level was not released. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/cubetexture9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/nine/cubetexture9.c b/src/gallium/state_trackers/nine/cubetexture9.c index 0a834eba4bd..977a345552b 100644 --- a/src/gallium/state_trackers/nine/cubetexture9.c +++ b/src/gallium/state_trackers/nine/cubetexture9.c @@ -173,7 +173,7 @@ NineCubeTexture9_dtor( struct NineCubeTexture9 *This ) DBG("This=%p\n", This); if (This->surfaces) { - for (i = 0; i < This->base.base.info.last_level * 6; ++i) + for (i = 0; i < (This->base.base.info.last_level + 1) * 6; ++i) NineUnknown_Destroy(&This->surfaces[i]->base.base); FREE(This->surfaces); } -- cgit v1.2.3