Mercurial > pidgin.yaz
comparison src/prefs.c @ 4215:e9e55f0a991c
[gaim-migrate @ 4454]
Ari Pollak (sourceo) writes:
"This fixes a memory leak in the preferences dialog,
since plug->iter gets allocated every time the prefs
dialog is opened, but never freed."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 06 Jan 2003 18:37:44 +0000 |
parents | 511c2b63caa4 |
children | a614423c648f |
comparison
equal
deleted
inserted
replaced
4214:709de528927e | 4215:e9e55f0a991c |
---|---|
80 * PROTOTYPES | 80 * PROTOTYPES |
81 */ | 81 */ |
82 GtkTreeIter *prefs_notebook_add_page(char*, GdkPixbuf*, GtkWidget*, GtkTreeIter*, GtkTreeIter*, int); | 82 GtkTreeIter *prefs_notebook_add_page(char*, GdkPixbuf*, GtkWidget*, GtkTreeIter*, GtkTreeIter*, int); |
83 | 83 |
84 void delete_prefs(GtkWidget *asdf, void *gdsa) { | 84 void delete_prefs(GtkWidget *asdf, void *gdsa) { |
85 GList *l = plugins; | |
86 struct gaim_plugin *plug; | |
87 | |
85 save_prefs(); | 88 save_prefs(); |
86 prefs = NULL; | 89 prefs = NULL; |
87 tree_v = NULL; | 90 tree_v = NULL; |
88 sound_entry = NULL; | 91 sound_entry = NULL; |
89 browser_entry = NULL; | 92 browser_entry = NULL; |
91 prefs_away_menu = NULL; | 94 prefs_away_menu = NULL; |
92 notebook_page = 0; | 95 notebook_page = 0; |
93 if(sounddialog) | 96 if(sounddialog) |
94 gtk_widget_destroy(sounddialog); | 97 gtk_widget_destroy(sounddialog); |
95 g_object_unref(G_OBJECT(prefs_away_store)); | 98 g_object_unref(G_OBJECT(prefs_away_store)); |
99 while(l) { | |
100 plug = l->data; | |
101 if(plug->iter) { | |
102 g_free(plug->iter); | |
103 plug->iter = NULL; | |
104 } | |
105 l = l->next; | |
106 } | |
96 } | 107 } |
97 | 108 |
98 GtkWidget *preflabel; | 109 GtkWidget *preflabel; |
99 GtkWidget *prefsnotebook; | 110 GtkWidget *prefsnotebook; |
100 GtkTreeStore *prefstree; | 111 GtkTreeStore *prefstree; |