fix a memory leak in error case

svn path=/trunk/; revision=67383
This commit is contained in:
Christoph von Wittich 2015-04-24 18:38:48 +00:00
parent 050de17f6a
commit 10295ad9df

View file

@ -150,8 +150,12 @@ NtGdiGetDeviceGammaRamp(
}
Ret = IntGetDeviceGammaRamp((HDEV)dc->ppdev, SafeRamp);
if (!Ret) return Ret;
if (!Ret)
{
DC_UnlockDc(dc);
ExFreePoolWithTag(SafeRamp, GDITAG_ICM);
return Ret;
}
_SEH2_TRY
{