changeset 21713:975336b01aa9

g_strdup() connection error descriptions when restoring cached errors for accounts. The description gets g_free()d when the error changes, causing crashes. Fixes #4160
author Will Thompson <will.thompson@collabora.co.uk>
date Sat, 01 Dec 2007 23:40:13 +0000
parents 19ad2242c06d
children 1c9f741ee9c7
files libpurple/account.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Sat Dec 01 23:36:52 2007 +0000
+++ b/libpurple/account.c	Sat Dec 01 23:40:13 2007 +0000
@@ -741,7 +741,7 @@
 
 	current_error = g_new0(PurpleConnectionErrorInfo, 1);
 	current_error->type = type;
-	current_error->description = description;
+	current_error->description = g_strdup(description);
 
 	set_current_error(account, current_error);
 }