Author: cwittich
Date: Fri Apr 24 18:38:48 2015
New Revision: 67383
URL:
http://svn.reactos.org/svn/reactos?rev=67383&view=rev
Log:
[WIN32K]
fix a memory leak in error case
Modified:
trunk/reactos/win32ss/gdi/ntgdi/icm.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/icm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/icm.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/icm.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/icm.c [iso-8859-1] Fri Apr 24 18:38:48 2015
@@ -150,8 +150,12 @@
}
Ret = IntGetDeviceGammaRamp((HDEV)dc->ppdev, SafeRamp);
-
- if (!Ret) return Ret;
+ if (!Ret)
+ {
+ DC_UnlockDc(dc);
+ ExFreePoolWithTag(SafeRamp, GDITAG_ICM);
+ return Ret;
+ }
_SEH2_TRY
{