OSDN Git Service

nvfx: fix minor memory leak
authorLuca Barbieri <luca@luca-barbieri.com>
Sun, 22 Aug 2010 22:16:23 +0000 (00:16 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Sun, 22 Aug 2010 22:16:59 +0000 (00:16 +0200)
src/gallium/drivers/nvfx/nvfx_fragprog.c

index 12b002a..a7e43b1 100644 (file)
@@ -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)