mesa: fix renderbuffer leak
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 6 Apr 2017 21:55:17 +0000 (07:55 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 7 Apr 2017 09:48:10 +0000 (19:48 +1000)
commit8046a944d084b4ae4e70e61ba50846fd1943247f
tree92ce6d280ffe3dd5b5c95bcdd60a9cf8998ac02f
parent1c934bc71b36ec33e59f4b7dc1c7d194585a5bd6
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 <siglesias@igalia.com>
src/mesa/main/fbobject.c
src/mesa/swrast/s_renderbuffer.c