[ros-diffs] [fireball] 32581: - Don't free buffers if they were not allocated.

fireball at svn.reactos.org fireball at svn.reactos.org
Sun Mar 9 12:34:20 CET 2008


Author: fireball
Date: Thu Mar  6 12:11:34 2008
New Revision: 32581

URL: http://svn.reactos.org/svn/reactos?rev=3D32581&view=3Drev
Log:
- Don't free buffers if they were not allocated.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
    trunk/reactos/subsystems/win32/win32k/objects/path.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/menu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win3=
2k/ntuser/menu.c?rev=3D32581&r1=3D32580&r2=3D32581&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/subsystems/win32/win32k/ntuser/menu.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/menu.c Thu Mar  6 12:11:34=
 2008
@@ -238,7 +238,7 @@
    }
 =

    /* Free memory */
-   ExFreePool(MenuItem->Text.Buffer);
+   if (MenuItem->Text.Buffer) ExFreePool(MenuItem->Text.Buffer);
    ExFreePool(MenuItem);
 =

    return TRUE;

Modified: trunk/reactos/subsystems/win32/win32k/objects/path.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win3=
2k/objects/path.c?rev=3D32581&r1=3D32580&r2=3D32581&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/subsystems/win32/win32k/objects/path.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/path.c Thu Mar  6 12:11:3=
4 2008
@@ -492,8 +492,8 @@
 {
   ASSERT(pPath!=3DNULL);
 =

-  ExFreePool(pPath->pPoints);
-  ExFreePool(pPath->pFlags);
+  if (pPath->pPoints) ExFreePool(pPath->pPoints);
+  if (pPath->pFlags) ExFreePool(pPath->pFlags);
 }
 =

 /* PATH_AssignGdiPath




More information about the Ros-diffs mailing list