diff options
author | Christoph Bumiller <[email protected]> | 2009-12-04 23:16:32 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2009-12-12 16:38:59 +0100 |
commit | 9f3644c42350fec2cda17e66548c517d9d00e47f (patch) | |
tree | 8b06da6b03e50421961f73989302fb05e2c3974c /src/gallium/drivers | |
parent | f7a97344924461d64bfa5bd1b6a2c1151b70cc7c (diff) |
nv50: plug memory leak in miptree creation/destruction
Keeping this dynamically allocated for texture arrays.
Since we don't use it to store zslice offsets anymore
it's either 1 or 6 integers (cube) ...
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_miptree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c index 40ee6659993..795db5872df 100644 --- a/src/gallium/drivers/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nv50/nv50_miptree.c @@ -130,6 +130,8 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp) mt->level[0].tile_mode, tile_flags, &mt->base.bo); if (ret) { + for (l = 0; l < pt->last_level; ++l) + FREE(mt->level[l].image_offset); FREE(mt); return NULL; } @@ -169,6 +171,10 @@ static void nv50_miptree_destroy(struct pipe_texture *pt) { struct nv50_miptree *mt = nv50_miptree(pt); + unsigned l; + + for (l = 0; l < pt->last_level; ++l) + FREE(mt->level[l].image_offset); nouveau_bo_ref(NULL, &mt->base.bo); FREE(mt); |