From: Julien Cristau <jcristau@debian.org>
To: Keith Packard <keithp@keithp.com>
Cc: Keith Packard <keithp@kemper.freedesktop.org>,
intel-gfx@lists.freedesktop.org
Subject: Re: xf86-video-intel: 3 commits - src/intel_display.c src/intel_dri.c src/intel.h
Date: Thu, 24 Mar 2011 19:31:03 +0100 [thread overview]
Message-ID: <20110324183103.GF3159@radis.liafa.jussieu.fr> (raw)
In-Reply-To: <yun39mctmov.fsf@aiko.keithp.com>
On Thu, Mar 24, 2011 at 11:09:36 -0700, Keith Packard wrote:
> diff --git a/src/intel_dri.c b/src/intel_dri.c
> index 3b80823..f7a4fc4 100644
> --- a/src/intel_dri.c
> +++ b/src/intel_dri.c
> @@ -625,8 +625,10 @@ i830_dri2_add_frame_event(DRI2FrameEventPtr frame_event)
> if (!AddResource(frame_event->client_id, frame_event_client_type, frame_event))
> return FALSE;
>
> - if (!AddResource(frame_event->drawable_id, frame_event_drawable_type, frame_event))
> + if (!AddResource(frame_event->drawable_id, frame_event_drawable_type, frame_event)) {
> + FreeResourceByType(frame_event->client_id, frame_event_client_type, TRUE);
> return FALSE;
> + }
>
> return TRUE;
> }
> @@ -705,7 +707,10 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel,
> flip_info->event_data = data;
> flip_info->frame = target_msc;
>
> - i830_dri2_add_frame_event(flip_info);
> + if (!i830_dri2_add_frame_event(flip_info)) {
> + free(flip_info);
> + return FALSE;
> + }
>
> /* Page flip the full screen buffer */
> back_priv = back->driverPrivate;
> @@ -958,7 +963,10 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
> I830DRI2ReferenceBuffer(front);
> I830DRI2ReferenceBuffer(back);
>
> - i830_dri2_add_frame_event(swap_info);
> + if (!i830_dri2_add_frame_event(swap_info)) {
> + free(swap_info);
This will cause a double free as the blit_fallback path does it too.
> + goto blit_fallback;
> + }
>
> /* Get current count */
> vbl.request.type = DRM_VBLANK_RELATIVE;
>
Cheers,
Julien
next prev parent reply other threads:[~2011-03-24 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110324002457.C7976F80E7@kemper.freedesktop.org>
2011-03-24 1:02 ` xf86-video-intel: 3 commits - src/intel_display.c src/intel_dri.c src/intel.h Julien Cristau
2011-03-24 18:09 ` Keith Packard
2011-03-24 18:31 ` Julien Cristau [this message]
2011-03-24 23:52 ` Keith Packard
2011-03-24 23:57 ` Julien Cristau
2011-03-25 0:14 ` Keith Packard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110324183103.GF3159@radis.liafa.jussieu.fr \
--to=jcristau@debian.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keithp@keithp.com \
--cc=keithp@kemper.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.