[Glamor] [PATCH] glamor: fix leak in xv code.

gongzg zhigang.gong at gmail.com
Mon Dec 16 06:22:56 PST 2013


LGTM, pushed, thanks.

On Fri, Dec 13, 2013 at 11:33:46AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> 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 at redhat.com>
> ---
>  src/glamor_xv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/glamor_xv.c b/src/glamor_xv.c
> index 8f12c1f..a89b4cd 100644
> --- a/src/glamor_xv.c
> +++ b/src/glamor_xv.c
> @@ -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]);
>  
> -- 
> 1.8.1.4
> 
> _______________________________________________
> Glamor mailing list
> Glamor at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/glamor


More information about the Glamor mailing list