summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_tex.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-02-24 12:04:49 +1000
committerDave Airlie <airlied@redhat.com>2009-02-24 12:04:49 +1000
commit2ebf9b95213b3d1e67dad16442cdd0d8571ef0b3 (patch)
treecf1858f8a4f5cce2c6ab172a6986030954749da1 /src/mesa/drivers/dri/r300/r300_tex.c
parentc32a28d86eda3d1984f6a571be0db6c6f5c7f5dc (diff)
r300: fix bo ref/unref, plugs DRI handle leaks
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_tex.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 27b907019e..0f5afbfa29 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -270,6 +270,11 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
rmesa->hw.textures[i] = 0;
}
+ if (t->bo) {
+ radeon_bo_unref(t->bo);
+ t->bo = NULL;
+ }
+
if (t->mt) {
radeon_miptree_unreference(t->mt);
t->mt = 0;