[accounts-dialog] Fix a possible crash when changing password
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Fix a possible crash when changing password
- Date: Tue, 6 Apr 2010 02:05:11 +0000 (UTC)
commit adf5a77d5f4f5f0e94f0fad669ee7192d1a5f5f5
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 5 22:03:02 2010 -0400
Fix a possible crash when changing password
src/run-passwd.c | 1 -
src/um-password-dialog.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/run-passwd.c b/src/run-passwd.c
index c702364..7e40661 100644
--- a/src/run-passwd.c
+++ b/src/run-passwd.c
@@ -57,7 +57,6 @@ typedef enum {
struct PasswdHandler {
const char *current_password;
const char *new_password;
- const char *retyped_password;
/* Communication with the passwd program */
GPid backend_pid;
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
index d581a18..81c03dd 100644
--- a/src/um-password-dialog.c
+++ b/src/um-password-dialog.c
@@ -777,10 +777,6 @@ um_password_dialog_set_user (UmPasswordDialog *um,
GdkPixbuf *pixbuf;
GtkTreeModel *model;
- if (um->passwd_handler) {
- passwd_destroy (um->passwd_handler);
- um->passwd_handler = NULL;
- }
if (um->user) {
g_object_unref (um->user);
um->user = NULL;
@@ -803,6 +799,8 @@ um_password_dialog_set_user (UmPasswordDialog *um,
if (um_user_get_uid (um->user) == getuid()) {
gtk_widget_show (um->old_password_label);
gtk_widget_show (um->old_password_entry);
+ if (um->passwd_handler != NULL)
+ passwd_destroy (um->passwd_handler);
um->passwd_handler = passwd_init ();
um->old_password_ok = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]