xserver: Branch 'master'
Keith Packard
keithp at kemper.freedesktop.org
Mon May 17 18:16:58 PDT 2010
hw/xfree86/dri2/dri2.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit cba9942f7716b12c329616a9994c5bce857617fa
Author: Kristian Høgsberg <krh at bitplanet.net>
Date: Mon May 17 17:40:30 2010 -0400
dri2: Fix NULL check in allocation error handling
1461b31e40a3e44f6327199d23cf2ab70d8f5176 tests to see if the allocation
of buffer[i] failed after i has been incremented, causing it to look
at the wrong pointer.
Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
Tested-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 68982fe..29c917f 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -421,22 +421,24 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
if (need_real_front > 0) {
if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft,
front_format, dimensions_match,
- &buffers[i++]))
+ &buffers[i]))
buffers_changed = 1;
if (buffers[i] == NULL)
goto err_out;
+ i++;
}
if (need_fake_front > 0) {
if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFakeFrontLeft,
front_format, dimensions_match,
- &buffers[i++]))
+ &buffers[i]))
buffers_changed = 1;
if (buffers[i] == NULL)
goto err_out;
+ i++;
have_fake_front = 1;
}
More information about the xorg-commit
mailing list