user32: Free the correct dce (Coverity).

This commit is contained in:
Marcus Meissner 2012-08-17 21:23:38 +02:00 committed by Alexandre Julliard
parent f1b4c33162
commit 3fb8a42638
1 changed files with 5 additions and 3 deletions

View File

@ -314,9 +314,11 @@ static struct dce *get_window_dce( HWND hwnd )
if (dce_to_free)
{
SetDCHook( dce->hdc, NULL, 0 );
DeleteDC( dce->hdc );
HeapFree( GetProcessHeap(), 0, dce );
SetDCHook( dce_to_free->hdc, NULL, 0 );
DeleteDC( dce_to_free->hdc );
HeapFree( GetProcessHeap(), 0, dce_to_free );
if (dce_to_free == dce)
dce = NULL;
}
}
return dce;