[ros-diffs] [fireball] 29398: - Fix a mistake, led to usage of unitialized memory and then freeing it.

fireball at svn.reactos.org fireball at svn.reactos.org
Fri Oct 5 19:08:24 CEST 2007


Author: fireball
Date: Fri Oct  5 21:08:23 2007
New Revision: 29398

URL: http://svn.reactos.org/svn/reactos?rev=29398&view=rev
Log:
- Fix a mistake, led to usage of unitialized memory and then freeing it.

Modified:
    trunk/reactos/ntoskrnl/config/cmdata.c
    trunk/reactos/ntoskrnl/config/cmsysini.c

Modified: trunk/reactos/ntoskrnl/config/cmdata.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdata.c?rev=29398&r1=29397&r2=29398&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmdata.c (original)
+++ trunk/reactos/ntoskrnl/config/cmdata.c Fri Oct  5 21:08:23 2007
@@ -43,7 +43,6 @@
 UNICODE_STRING CmSymbolicLinkValueName =
     RTL_CONSTANT_STRING(L"SymbolicLinkValue");
 
-UNICODE_STRING CmpSystemStartOptions;
 UNICODE_STRING CmpLoadOptions;
 
 BOOLEAN CmpShareSystemHives;

Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c?rev=29398&r1=29397&r2=29398&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c Fri Oct  5 21:08:23 2007
@@ -167,12 +167,9 @@
                            &KeyName,
                            0,
                            REG_SZ,
-                           CmpSystemStartOptions.Buffer,
-                           CmpSystemStartOptions.Length);
+                           CmpLoadOptions.Buffer,
+                           CmpLoadOptions.Length);
     if (!NT_SUCCESS(Status)) goto Quickie;
-
-    /* Free the options now */
-    ExFreePool(CmpSystemStartOptions.Buffer);
 
     /* Setup value name for system boot device */
     RtlInitUnicodeString(&KeyName, L"SystemBootDevice");




More information about the Ros-diffs mailing list