summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-07 07:55:17 +1000
committerTimothy Arceri <[email protected]>2017-04-07 19:48:10 +1000
commit8046a944d084b4ae4e70e61ba50846fd1943247f (patch)
tree92ce6d280ffe3dd5b5c95bcdd60a9cf8998ac02f /src/mesa/main
parent1c934bc71b36ec33e59f4b7dc1c7d194585a5bd6 (diff)
mesa: fix renderbuffer leak
We don't need to call _mesa_reference_renderbuffer() for the first assignment as refCount starts at 1. For swrast we work around the fact we will indirectly call _mesa_reference_renderbuffer() by resetting refCount to 0. Fixes: 32141e53d1520 (mesa: tidy up renderbuffer RefCount initialisation) Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 3289f86803c..d486d01195f 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -451,7 +451,7 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glFramebufferTexture()");
return;
}
- _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
+ att->Renderbuffer = rb;
/* This can't get called on a texture renderbuffer, so set it to NULL
* for clarity compared to user renderbuffers.