user32: Free the correct dce (Coverity).
This commit is contained in:
parent
f1b4c33162
commit
3fb8a42638
|
@ -314,9 +314,11 @@ static struct dce *get_window_dce( HWND hwnd )
|
||||||
|
|
||||||
if (dce_to_free)
|
if (dce_to_free)
|
||||||
{
|
{
|
||||||
SetDCHook( dce->hdc, NULL, 0 );
|
SetDCHook( dce_to_free->hdc, NULL, 0 );
|
||||||
DeleteDC( dce->hdc );
|
DeleteDC( dce_to_free->hdc );
|
||||||
HeapFree( GetProcessHeap(), 0, dce );
|
HeapFree( GetProcessHeap(), 0, dce_to_free );
|
||||||
|
if (dce_to_free == dce)
|
||||||
|
dce = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dce;
|
return dce;
|
||||||
|
|
Loading…
Reference in New Issue