[MKHIVE]
authorGregor Schneider <grschneider@gmail.com>
Fri, 14 May 2010 21:13:33 +0000 (21:13 +0000)
committerGregor Schneider <grschneider@gmail.com>
Fri, 14 May 2010 21:13:33 +0000 (21:13 +0000)
- Active the planned cleanup function to motivate people to actually free resources: mkhive currently leaks ~500kb of memory after a usual run
- Improve debug print

svn path=/trunk/; revision=47207

reactos/tools/mkhive/mkhive.c
reactos/tools/mkhive/registry.c
reactos/tools/mkhive/registry.h

index c3f9f91..41c15a5 100644 (file)
@@ -173,7 +173,7 @@ int main (int argc, char *argv[])
                return 1;
        }
 
-       //RegShutdownRegistry ();
+       RegShutdownRegistry ();
 
        printf ("  Done.\n");
 
index 6813a67..07339af 100644 (file)
@@ -250,7 +250,7 @@ RegDeleteKeyW(
        IN HKEY hKey,
        IN LPCWSTR lpSubKey)
 {
-       DPRINT1("FIXME!\n");
+       DPRINT1("FIXME: implement RegDeleteKeyW!\n");
        return ERROR_SUCCESS;
 }
 
@@ -682,4 +682,13 @@ RegInitializeRegistry(VOID)
                &ControlSetKey);
 }
 
+VOID
+RegShutdownRegistry(VOID)
+{
+       /* FIXME: clean up the complete hive */
+
+       free(RootKey->Name);
+       free(RootKey);
+}
+
 /* EOF */
index 696126b..40df369 100644 (file)
@@ -121,4 +121,7 @@ RegGetValueCount (HKEY Key);
 VOID
 RegInitializeRegistry(VOID);
 
+VOID
+RegShutdownRegistry(VOID);
+
 /* EOF */