From 74feba4d77d74979a0ea478d666439ffc55001e5 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 1 Aug 2007 14:30:03 -0700 Subject: Don't unwrap too early in libwfb for Composite. Don't call fbFinishWrap until the pixman_image_t that stores the pointer is actually freed. This prevents corruption or crashes caused by accessing a wrapped pointer after the wrapping is torn down. --- fb/fbtrap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'fb/fbtrap.c') diff --git a/fb/fbtrap.c b/fb/fbtrap.c index e70336cce..830603ae7 100644 --- a/fb/fbtrap.c +++ b/fb/fbtrap.c @@ -47,9 +47,7 @@ fbAddTraps (PicturePtr pPicture, pixman_add_traps (image, x_off, y_off, ntrap, (pixman_trap_t *)traps); - fbFinishAccess (pPicture->pDrawable); - - pixman_image_unref (image); + free_pixman_pict (pPicture, image); } void @@ -65,9 +63,7 @@ fbRasterizeTrapezoid (PicturePtr pPicture, pixman_rasterize_trapezoid (image, (pixman_trapezoid_t *)trap, x_off, y_off); - fbFinishAccess (pPicture->pDrawable); - - pixman_image_unref (image); + free_pixman_pict (pPicture, image); } static int -- cgit v1.2.3