[ros-diffs] [gschneider] 47207: [MKHIVE] - 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

gschneider at svn.reactos.org gschneider at svn.reactos.org
Fri May 14 23:13:34 CEST 2010


Author: gschneider
Date: Fri May 14 23:13:33 2010
New Revision: 47207

URL: http://svn.reactos.org/svn/reactos?rev=47207&view=rev
Log:
[MKHIVE]
- 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

Modified:
    trunk/reactos/tools/mkhive/mkhive.c
    trunk/reactos/tools/mkhive/registry.c
    trunk/reactos/tools/mkhive/registry.h

Modified: trunk/reactos/tools/mkhive/mkhive.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.c?rev=47207&r1=47206&r2=47207&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/mkhive.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/mkhive.c [iso-8859-1] Fri May 14 23:13:33 2010
@@ -173,7 +173,7 @@
 		return 1;
 	}
 
-	//RegShutdownRegistry ();
+	RegShutdownRegistry ();
 
 	printf ("  Done.\n");
 

Modified: trunk/reactos/tools/mkhive/registry.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.c?rev=47207&r1=47206&r2=47207&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/registry.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/registry.c [iso-8859-1] Fri May 14 23:13:33 2010
@@ -250,7 +250,7 @@
 	IN HKEY hKey,
 	IN LPCWSTR lpSubKey)
 {
-	DPRINT1("FIXME!\n");
+	DPRINT1("FIXME: implement RegDeleteKeyW!\n");
 	return ERROR_SUCCESS;
 }
 
@@ -682,4 +682,13 @@
 		&ControlSetKey);
 }
 
+VOID
+RegShutdownRegistry(VOID)
+{
+	/* FIXME: clean up the complete hive */
+
+	free(RootKey->Name);
+	free(RootKey);
+}
+
 /* EOF */

Modified: trunk/reactos/tools/mkhive/registry.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/registry.h?rev=47207&r1=47206&r2=47207&view=diff
==============================================================================
--- trunk/reactos/tools/mkhive/registry.h [iso-8859-1] (original)
+++ trunk/reactos/tools/mkhive/registry.h [iso-8859-1] Fri May 14 23:13:33 2010
@@ -121,4 +121,7 @@
 VOID
 RegInitializeRegistry(VOID);
 
+VOID
+RegShutdownRegistry(VOID);
+
 /* EOF */




More information about the Ros-diffs mailing list