changeset 23354:6b09c40a15d1

There's no need to dup this
author Mark Doliner <mark@kingant.net>
date Thu, 12 Jun 2008 16:09:58 +0000
parents adda955a8db6
children 2a5bc3e6da7b
files libpurple/protocols/simple/simple.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/simple/simple.c	Wed Jun 11 15:36:42 2008 +0000
+++ b/libpurple/protocols/simple/simple.c	Thu Jun 12 16:09:58 2008 +0000
@@ -1898,7 +1898,7 @@
 	PurpleConnection *gc;
 	struct simple_account_data *sip;
 	gchar **userserver;
-	gchar *hosttoconnect;
+	const gchar *hosttoconnect;
 
 	const char *username = purple_account_get_username(account);
 	gc = purple_account_get_connection(account);
@@ -1934,14 +1934,13 @@
 	sip->status = g_strdup("available");
 
 	if(!purple_account_get_bool(account, "useproxy", FALSE)) {
-		hosttoconnect = g_strdup(sip->servername);
+		hosttoconnect = sip->servername;
 	} else {
-		hosttoconnect = g_strdup(purple_account_get_string(account, "proxy", sip->servername));
+		hosttoconnect = purple_account_get_string(account, "proxy", sip->servername);
 	}
 
 	sip->srv_query_data = purple_srv_resolve("sip",
 			sip->udp ? "udp" : "tcp", hosttoconnect, srvresolved, sip);
-	g_free(hosttoconnect);
 }
 
 static void simple_close(PurpleConnection *gc)