[Intel-gfx] xf86-video-intel: 3 commits - src/intel_display.c src/intel_dri.c src/intel.h

Julien Cristau jcristau at debian.org
Fri Mar 25 00:57:10 CET 2011


On Thu, Mar 24, 2011 at 16:52:25 -0700, Keith Packard wrote:

> On Thu, 24 Mar 2011 19:31:03 +0100, Julien Cristau <jcristau at debian.org> wrote:
> 
> > This will cause a double free as the blit_fallback path does it too.
> 
> Argh! So we need to check before we reference the buffers and set
> swap_info to NULL. This code is too twisty...
> 
> @@ -955,11 +960,16 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
>         swap_info->event_data = data;
>         swap_info->front = front;
>         swap_info->back = back;
> +
> +       if (!i830_dri2_add_frame_event(swap_info)) {
> +           free(swap_info);
> +           swap_info = NULL;
> +           goto blit_fallback;
> +       }
> +
>         I830DRI2ReferenceBuffer(front);
>         I830DRI2ReferenceBuffer(back);
>  
> -       i830_dri2_add_frame_event(swap_info);
> -
>         /* Get current count */
>         vbl.request.type = DRM_VBLANK_RELATIVE;
>         if (pipe > 0)
> 
With that change,
Reviewed-by: Julien Cristau <jcristau at debian.org>

Thanks!
Julien



More information about the Intel-gfx mailing list