glamor: fix leak in xv code.

This loop needed to go one higher, not sure if this fixes the leak
MrCooper was seeing on irc, but it fixes a leak.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
Dave Airlie 2013-12-13 11:33:46 +10:00 committed by Eric Anholt
parent 752a79562e
commit b8055bd1f6

View File

@ -490,7 +490,7 @@ static int glamor_xv_put_image(ScrnInfoPtr pScrn,
if (!port_priv->src_pix[0] || (width != port_priv->src_pix_w || height != port_priv->src_pix_h)) {
int i;
for (i = 0; i < 2; i++)
for (i = 0; i < 3; i++)
if (port_priv->src_pix[i])
glamor_destroy_pixmap(port_priv->src_pix[i]);