xa: don't leak fences
authorRob Clark <robclark@freedesktop.org>
Wed, 8 Jul 2015 17:30:22 +0000 (13:30 -0400)
committerRob Clark <robclark@freedesktop.org>
Fri, 10 Jul 2015 15:57:30 +0000 (11:57 -0400)
commit0a8af6361eecaba0f34a668328746924b61caa6a
tree675f3a7c9bd82f7ea5f08adc9d8ccb2c432bfaf9
parentf12302b89836a24255674a251f7a6902b4e9af7c
xa: don't leak fences

XA was never unref'ing last_fence in the various call paths to
pipe->flush().  Add this to xa_context_flush() and update the other
open-coded calls to pipe->flush() to use xa_context_flush() instead.

This fixes a memory leak reported with xf86-video-freedreno.

Reported-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/state_trackers/xa/xa_context.c
src/gallium/state_trackers/xa/xa_tracker.c
src/gallium/state_trackers/xa/xa_yuv.c