gdi32: Don't bother using the return value of HeapFree().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2018-01-22 09:53:38 +00:00 committed by Alexandre Julliard
parent 8bdcaf6036
commit 1def41b903
9 changed files with 19 additions and 9 deletions

View File

@ -489,7 +489,8 @@ static BOOL BITMAP_DeleteObject( HGDIOBJ handle )
if (!bmp) return FALSE; if (!bmp) return FALSE;
HeapFree( GetProcessHeap(), 0, bmp->dib.dsBm.bmBits ); HeapFree( GetProcessHeap(), 0, bmp->dib.dsBm.bmBits );
return HeapFree( GetProcessHeap(), 0, bmp ); HeapFree( GetProcessHeap(), 0, bmp );
return TRUE;
} }

View File

@ -467,7 +467,8 @@ static BOOL BRUSH_DeleteObject( HGDIOBJ handle )
if (!brush) return FALSE; if (!brush) return FALSE;
free_brush_pattern( &brush->pattern ); free_brush_pattern( &brush->pattern );
return HeapFree( GetProcessHeap(), 0, brush ); HeapFree( GetProcessHeap(), 0, brush );
return TRUE;
} }

View File

@ -1831,5 +1831,6 @@ static BOOL DIB_DeleteObject( HGDIOBJ handle )
else VirtualFree( bmp->dib.dsBm.bmBits, 0, MEM_RELEASE ); else VirtualFree( bmp->dib.dsBm.bmBits, 0, MEM_RELEASE );
HeapFree(GetProcessHeap(), 0, bmp->color_table); HeapFree(GetProcessHeap(), 0, bmp->color_table);
return HeapFree( GetProcessHeap(), 0, bmp ); HeapFree( GetProcessHeap(), 0, bmp );
return TRUE;
} }

View File

@ -217,7 +217,8 @@ static struct wgl_context *dibdrv_wglCreateContext( HDC hdc )
static BOOL dibdrv_wglDeleteContext( struct wgl_context *context ) static BOOL dibdrv_wglDeleteContext( struct wgl_context *context )
{ {
pOSMesaDestroyContext( context->context ); pOSMesaDestroyContext( context->context );
return HeapFree( GetProcessHeap(), 0, context ); HeapFree( GetProcessHeap(), 0, context );
return TRUE;
} }
/*********************************************************************** /***********************************************************************

View File

@ -287,7 +287,8 @@ static BOOL EMF_Delete_HENHMETAFILE( HENHMETAFILE hmf )
UnmapViewOfFile( metaObj->emh ); UnmapViewOfFile( metaObj->emh );
else else
HeapFree( GetProcessHeap(), 0, metaObj->emh ); HeapFree( GetProcessHeap(), 0, metaObj->emh );
return HeapFree( GetProcessHeap(), 0, metaObj ); HeapFree( GetProcessHeap(), 0, metaObj );
return TRUE;
} }
/****************************************************************** /******************************************************************

View File

@ -811,7 +811,8 @@ static BOOL FONT_DeleteObject( HGDIOBJ handle )
FONTOBJ *obj; FONTOBJ *obj;
if (!(obj = free_gdi_handle( handle ))) return FALSE; if (!(obj = free_gdi_handle( handle ))) return FALSE;
return HeapFree( GetProcessHeap(), 0, obj ); HeapFree( GetProcessHeap(), 0, obj );
return TRUE;
} }

View File

@ -135,8 +135,10 @@ static POINT *convert_points( UINT count, const POINTS *pts )
BOOL WINAPI DeleteMetaFile( HMETAFILE hmf ) BOOL WINAPI DeleteMetaFile( HMETAFILE hmf )
{ {
METAHEADER *mh = free_gdi_handle( hmf ); METAHEADER *mh = free_gdi_handle( hmf );
if (!mh) return FALSE; if (!mh) return FALSE;
return HeapFree( GetProcessHeap(), 0, mh ); HeapFree( GetProcessHeap(), 0, mh );
return TRUE;
} }
/****************************************************************** /******************************************************************

View File

@ -610,7 +610,8 @@ static BOOL PALETTE_DeleteObject( HGDIOBJ handle )
PALETTE_UnrealizeObject( handle ); PALETTE_UnrealizeObject( handle );
if (!(obj = free_gdi_handle( handle ))) return FALSE; if (!(obj = free_gdi_handle( handle ))) return FALSE;
HeapFree( GetProcessHeap(), 0, obj->entries ); HeapFree( GetProcessHeap(), 0, obj->entries );
return HeapFree( GetProcessHeap(), 0, obj ); HeapFree( GetProcessHeap(), 0, obj );
return TRUE;
} }

View File

@ -279,7 +279,8 @@ static BOOL PEN_DeleteObject( HGDIOBJ handle )
if (!pen) return FALSE; if (!pen) return FALSE;
free_brush_pattern( &pen->pattern ); free_brush_pattern( &pen->pattern );
return HeapFree( GetProcessHeap(), 0, pen ); HeapFree( GetProcessHeap(), 0, pen );
return TRUE;
} }