soc.2008.masterpassword: 8167dfc0: Fixed a likely cause for the heap corrup...
scrouaf at soc.pidgin.im
scrouaf at soc.pidgin.im
Wed Aug 27 10:38:06 EDT 2008
-----------------------------------------------------------------
Revision: 8167dfc0ae60edd3548f5000bf578379659d1c72
Ancestor: f9215a50d2289e12ef703161613f7da2be05d5ef
Author: scrouaf at soc.pidgin.im
Date: 2008-08-27T14:12:19
Branch: im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/8167dfc0ae60edd3548f5000bf578379659d1c72
Modified files:
pidgin/gtkaccount.c
ChangeLog:
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.
-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c 77128faf0d11daffadc36606d67e3b4a288ee820
+++ pidgin/gtkaccount.c 39ca7105b2c94339e6f3f743eabfc3b0d3689753
@@ -1189,7 +1189,6 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
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 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
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 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
* 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);
}
More information about the Commits
mailing list