Author: tkreuzer
Date: Tue Aug 4 23:31:34 2009
New Revision: 42393
URL:
http://svn.reactos.org/svn/reactos?rev=42393&view=rev
Log:
Set pulXlate to aulXlate when freeing the allocated buffer to prevent double frees.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/xlate.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Tue Aug 4 23:31:34
2009
@@ -478,7 +478,10 @@
if (pexlo->xlo.flXlate & XO_TRIVIAL)
{
if (pexlo->xlo.pulXlate != pexlo->aulXlate)
+ {
EngFreeMem(pexlo->xlo.pulXlate);
+ pexlo->xlo.pulXlate = pexlo->aulXlate;
+ }
pexlo->pfnXlate = EXLATEOBJ_iXlateTrivial;
pexlo->xlo.flXlate = XO_TRIVIAL;
return;
@@ -760,7 +763,7 @@
{
EngFreeMem(pexlo->xlo.pulXlate);
}
- pexlo->xlo.pulXlate = NULL;
+ pexlo->xlo.pulXlate = pexlo->aulXlate;
}
VOID