Mesa (master): nvfx: fix minor memory leak

Luca Barbieri lb at kemper.freedesktop.org
Sun Aug 22 22:17:11 UTC 2010


Module: Mesa
Branch: master
Commit: 8ffc3572281c24d1f97b3c119117918dca80f53e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ffc3572281c24d1f97b3c119117918dca80f53e

Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Mon Aug 23 00:16:23 2010 +0200

nvfx: fix minor memory leak

---

 src/gallium/drivers/nvfx/nvfx_fragprog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/nvfx/nvfx_fragprog.c b/src/gallium/drivers/nvfx/nvfx_fragprog.c
index 12b002a..a7e43b1 100644
--- a/src/gallium/drivers/nvfx/nvfx_fragprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_fragprog.c
@@ -1518,7 +1518,7 @@ nvfx_fragprog_destroy(struct nvfx_context *nvfx,
 		while(fpbo != fp->fpbo);
 	}
 
-	for(i = 0; i < 8; ++i)
+	for(i = 0; i < Elements(fp->slot_relocations); ++i)
 		util_dynarray_fini(&fp->slot_relocations[i]);
 
 	if (fp->insn_len)




More information about the mesa-commit mailing list