changeset 14173:178540dc0517

[gaim-migrate @ 16823] Patch #1541744 ("Memleak"): "This plugs a possible memleak." The memleak would happen if you switch from an account with account-options to an account with none. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 18 Aug 2006 00:23:39 +0000
parents 06a2658aa96e
children 6672fdf310b2
files src/gtkaccount.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkaccount.c	Fri Aug 18 00:19:18 2006 +0000
+++ b/src/gtkaccount.c	Fri Aug 18 00:23:39 2006 +0000
@@ -646,6 +646,11 @@
 		dialog->protocol_frame = NULL;
 	}
 
+	if (dialog->protocol_opt_entries != NULL) {
+		g_list_free(dialog->protocol_opt_entries);
+		dialog->protocol_opt_entries = NULL;
+	}
+
 	if (dialog->prpl_info == NULL ||
 		dialog->prpl_info->protocol_options == NULL) {
 
@@ -669,11 +674,6 @@
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
 	gtk_widget_show(vbox);
 
-	if (dialog->protocol_opt_entries != NULL) {
-		g_list_free(dialog->protocol_opt_entries);
-		dialog->protocol_opt_entries = NULL;
-	}
-
 	for (l = dialog->prpl_info->protocol_options; l != NULL; l = l->next)
 	{
 		option = (GaimAccountOption *)l->data;