Wed, 27 Aug 2008 14:12:19 +0000
Fixed a likely cause for the heap corruption in ok_account_prefs_cb(), as well
as a memory leak. It was because I freed the original instead of the copy.
See diff for details.
| pidgin/gtkaccount.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkaccount.c Wed Aug 27 13:58:27 2008 +0000 +++ b/pidgin/gtkaccount.c Wed Aug 27 14:12:19 2008 +0000 @@ -1189,7 +1189,6 @@ gboolean new_acct = FALSE, icon_change = FALSE; PurpleAccount *account; gboolean remember; - char * copy; /* Build the username string. */ username = g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog->screenname_entry))); @@ -1307,6 +1306,7 @@ gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(dialog->new_mail_check))); + /* Password */ value = gtk_entry_get_text(GTK_ENTRY(dialog->password_entry)); @@ -1317,9 +1317,7 @@ * don't want to prompt them. */ if ((purple_account_get_remember_password(account) || new_acct) && (*value != '\0')) { - copy = g_strdup(value); purple_account_set_password(account, value); - g_free(value); } else { purple_account_set_password(account, NULL); }