mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-04 15:23:32 +08:00
Cleanup and initialization checks.
This commit is contained in:
parent
7305828122
commit
ae2a96293b
@ -160,14 +160,9 @@ static int test_gdi_ClipCoords(void)
|
||||
rc = 0;
|
||||
fail:
|
||||
|
||||
if (rgn1)
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
||||
|
||||
if (rgn2)
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
||||
|
||||
if (bmp)
|
||||
gdi_DeleteObject((HGDIOBJECT)bmp);
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
||||
gdi_DeleteObject((HGDIOBJECT)bmp);
|
||||
|
||||
gdi_DeleteDC(hdc);
|
||||
return rc;
|
||||
@ -332,14 +327,9 @@ static int test_gdi_InvalidateRegion(void)
|
||||
rc = 0;
|
||||
fail:
|
||||
|
||||
if (rgn1)
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
||||
|
||||
if (rgn2)
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
||||
|
||||
if (bmp)
|
||||
gdi_DeleteObject((HGDIOBJECT)bmp);
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
||||
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
||||
gdi_DeleteObject((HGDIOBJECT)bmp);
|
||||
|
||||
gdi_DeleteDC(hdc);
|
||||
return 0;
|
||||
|
@ -184,12 +184,12 @@ static int sspi_ContextBufferAllocTableGrow(void)
|
||||
|
||||
static void sspi_ContextBufferAllocTableFree(void)
|
||||
{
|
||||
if (ContextBufferAllocTable.cEntries == 0)
|
||||
{
|
||||
ContextBufferAllocTable.cEntries = ContextBufferAllocTable.cMaxEntries = 0;
|
||||
free(ContextBufferAllocTable.entries);
|
||||
ContextBufferAllocTable.entries = NULL;
|
||||
}
|
||||
if (ContextBufferAllocTable.cEntries != 0)
|
||||
WLog_ERR(TAG, "ContextBufferAllocTable.entries == %"PRIu32, ContextBufferAllocTable.cEntries);
|
||||
|
||||
ContextBufferAllocTable.cEntries = ContextBufferAllocTable.cMaxEntries = 0;
|
||||
free(ContextBufferAllocTable.entries);
|
||||
ContextBufferAllocTable.entries = NULL;
|
||||
}
|
||||
|
||||
static void* sspi_ContextBufferAlloc(UINT32 allocatorIndex, size_t size)
|
||||
|
Loading…
Reference in New Issue
Block a user