gallium: do not increase ref count of the new throttle fence
authorJames Xiong <james.xiong@intel.com>
Wed, 16 Oct 2019 16:22:22 +0000 (09:22 -0700)
committerJosé Casanova Crespo <jmcasanova@igalia.com>
Thu, 17 Oct 2019 10:18:07 +0000 (10:18 +0000)
commit023282a4f667695ea1dbbe9fbe1cd3a9d550a426
tree2caa2d358a9f3801b08f5cc1c05017c6689f1622
parente8095f2af0736b5937674ca319f29cc9dabb17d4
gallium: do not increase ref count of the new throttle fence

A new throttle fence was initialized to 1, and increased by 1
again when it's put in drawable->throttle_fence; the ref was
decreased by 1 when it's removed from drawable->throttle_fence,
and never reached to 0, caused leak.

Fixes: ff77bf5cbf7 ("gallium: simplify throttle implementation")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1949
Signed-off-by: James Xiong <james.xiong@intel.com>
Reported-by: Florian Wesch <fw@info-beamer.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
src/gallium/state_trackers/dri/dri_drawable.c