[Intel-gfx] xf86-video-intel: 3 commits - src/intel_display.c src/intel_dri.c src/intel.h
Keith Packard
keithp at keithp.com
Fri Mar 25 00:52:25 CET 2011
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)
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110324/d605d62e/attachment.sig>
More information about the Intel-gfx
mailing list