Commit 8a3f3c08 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdi32/dibdrv: Fix a clipped_rects leak (Valgrind).

parent fc8bf3c3
...@@ -925,7 +925,10 @@ DWORD put_image_into_bitmap( BITMAPOBJ *bmp, HRGN clip, BITMAPINFO *info, ...@@ -925,7 +925,10 @@ DWORD put_image_into_bitmap( BITMAPOBJ *bmp, HRGN clip, BITMAPINFO *info,
src_dib.bits.is_copy = bits->is_copy; src_dib.bits.is_copy = bits->is_copy;
if (get_clipped_rects( &dib, &dst->visrect, clip, &clipped_rects )) if (get_clipped_rects( &dib, &dst->visrect, clip, &clipped_rects ))
{
copy_rect( &dib, &dst->visrect, &src_dib, &src->visrect, &clipped_rects, R2_COPYPEN ); copy_rect( &dib, &dst->visrect, &src_dib, &src->visrect, &clipped_rects, R2_COPYPEN );
free_clipped_rects( &clipped_rects );
}
return ERROR_SUCCESS; return ERROR_SUCCESS;
...@@ -981,6 +984,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info, ...@@ -981,6 +984,7 @@ DWORD dibdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
} }
else else
ret = execute_rop( pdev, &dst->visrect, &src_dib, &src->visrect, &clipped_rects, rop ); ret = execute_rop( pdev, &dst->visrect, &src_dib, &src->visrect, &clipped_rects, rop );
free_clipped_rects( &clipped_rects );
} }
if (tmp_rgn) DeleteObject( tmp_rgn ); if (tmp_rgn) DeleteObject( tmp_rgn );
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment