changeset 13767:61a6fe79ba15

[gaim-migrate @ 16179] Fix Registry key leakage. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 12 May 2006 02:50:23 +0000
parents e55e52d41287
children a49150844fdc
files plugins/win32/winprefs/winprefs.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/win32/winprefs/winprefs.c	Fri May 12 02:34:07 2006 +0000
+++ b/plugins/win32/winprefs/winprefs.c	Fri May 12 02:50:23 2006 +0000
@@ -382,7 +382,7 @@
 	GtkWidget *vbox;
 	GtkWidget *button;
 	char* gtk_version = NULL;
-	HKEY hKey = HKEY_CURRENT_USER;
+	HKEY hKey;
 
 	ret = gtk_vbox_new(FALSE, 18);
 	gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
@@ -409,6 +409,7 @@
 		if(ERROR_SUCCESS == RegQueryValueEx(hKey, "Gaim", 0, NULL, NULL, NULL)) {
 			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
 		}
+		RegCloseKey(hKey);
 	}
 	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(winprefs_set_autostart), NULL);
 	gtk_widget_show(button);