# HG changeset patch # User Mark Doliner # Date 1065392125 0 # Node ID a230b7bca1fb602a78dcd14461d671a466665762 # Parent 7fadcbdcac29d647980a7e87a1ea98d7ca68972a [gaim-migrate @ 7732] Fix a memleak of a GaimGtkPrivacyDialogThing when you use the close button, and also make the destroy and close callbacks match the behavior of the account dialog closer. committer: Tailor Script diff -r 7fadcbdcac29 -r a230b7bca1fb src/gtkprivacy.c --- a/src/gtkprivacy.c Sun Oct 05 19:59:21 2003 +0000 +++ b/src/gtkprivacy.c Sun Oct 05 22:15:25 2003 +0000 @@ -221,9 +221,7 @@ static gint destroy_cb(GtkWidget *w, GdkEvent *event, GaimGtkPrivacyDialog *dialog) { - g_free(dialog); - - privacy_dialog = NULL; + gaim_gtk_privacy_dialog_hide(); return 0; } @@ -325,8 +323,10 @@ } static void -close_cb(GtkWidget *button, void *user_data) +close_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog) { + gtk_widget_destroy(dialog->win); + gaim_gtk_privacy_dialog_hide(); } @@ -514,7 +514,7 @@ if (privacy_dialog == NULL) return; - gtk_widget_destroy(privacy_dialog->win); + g_free(privacy_dialog); privacy_dialog = NULL; }