Cleanup and initialization checks.
This commit is contained in:
parent
7305828122
commit
ae2a96293b
@ -160,13 +160,8 @@ static int test_gdi_ClipCoords(void)
|
|||||||
rc = 0;
|
rc = 0;
|
||||||
fail:
|
fail:
|
||||||
|
|
||||||
if (rgn1)
|
|
||||||
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
||||||
|
|
||||||
if (rgn2)
|
|
||||||
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
||||||
|
|
||||||
if (bmp)
|
|
||||||
gdi_DeleteObject((HGDIOBJECT)bmp);
|
gdi_DeleteObject((HGDIOBJECT)bmp);
|
||||||
|
|
||||||
gdi_DeleteDC(hdc);
|
gdi_DeleteDC(hdc);
|
||||||
@ -332,13 +327,8 @@ static int test_gdi_InvalidateRegion(void)
|
|||||||
rc = 0;
|
rc = 0;
|
||||||
fail:
|
fail:
|
||||||
|
|
||||||
if (rgn1)
|
|
||||||
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
gdi_DeleteObject((HGDIOBJECT)rgn1);
|
||||||
|
|
||||||
if (rgn2)
|
|
||||||
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
gdi_DeleteObject((HGDIOBJECT)rgn2);
|
||||||
|
|
||||||
if (bmp)
|
|
||||||
gdi_DeleteObject((HGDIOBJECT)bmp);
|
gdi_DeleteObject((HGDIOBJECT)bmp);
|
||||||
|
|
||||||
gdi_DeleteDC(hdc);
|
gdi_DeleteDC(hdc);
|
||||||
|
@ -184,12 +184,12 @@ static int sspi_ContextBufferAllocTableGrow(void)
|
|||||||
|
|
||||||
static void sspi_ContextBufferAllocTableFree(void)
|
static void sspi_ContextBufferAllocTableFree(void)
|
||||||
{
|
{
|
||||||
if (ContextBufferAllocTable.cEntries == 0)
|
if (ContextBufferAllocTable.cEntries != 0)
|
||||||
{
|
WLog_ERR(TAG, "ContextBufferAllocTable.entries == %"PRIu32, ContextBufferAllocTable.cEntries);
|
||||||
|
|
||||||
ContextBufferAllocTable.cEntries = ContextBufferAllocTable.cMaxEntries = 0;
|
ContextBufferAllocTable.cEntries = ContextBufferAllocTable.cMaxEntries = 0;
|
||||||
free(ContextBufferAllocTable.entries);
|
free(ContextBufferAllocTable.entries);
|
||||||
ContextBufferAllocTable.entries = NULL;
|
ContextBufferAllocTable.entries = NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* sspi_ContextBufferAlloc(UINT32 allocatorIndex, size_t size)
|
static void* sspi_ContextBufferAlloc(UINT32 allocatorIndex, size_t size)
|
||||||
|
Loading…
Reference in New Issue
Block a user