From c466a9713e2b1e8f33036fd347d7d0c7bea0f266 Mon Sep 17 00:00:00 2001 From: Antony Mee Date: Sun, 7 Jan 2007 17:09:37 +0000 Subject: [PATCH] Patch from Herbert Graeber * Fix string allocation error that cause the crash on x86_64 systems. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2212 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- vpn-daemons/pptp/auth-dialog/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vpn-daemons/pptp/auth-dialog/main.c b/vpn-daemons/pptp/auth-dialog/main.c index 6daa7965d4..5be4dc5da7 100644 --- a/vpn-daemons/pptp/auth-dialog/main.c +++ b/vpn-daemons/pptp/auth-dialog/main.c @@ -178,8 +178,8 @@ get_passwords (const char *vpn_name, const char *vpn_service, gboolean retry) // Statically set the authentication type for now. auth_type = g_strdup("CHAP"); result = g_slist_append (result, auth_type); - result = g_slist_append (result, username); - result = g_slist_append (result, password); + result = g_slist_append (result, g_strdup(username)); + result = g_slist_append (result, g_strdup(password)); switch (gnome_two_password_dialog_get_remember (GNOME_TWO_PASSWORD_DIALOG (dialog))) { @@ -198,6 +198,7 @@ get_passwords (const char *vpn_name, const char *vpn_service, gboolean retry) if (keyring_username!=NULL) g_free (keyring_username); if (keyring_password!=NULL) g_free (keyring_password); + gtk_widget_hide (dialog); gtk_widget_destroy (dialog); return result;