changeset 27785:baf65ce1463f

propagate from branch 'im.pidgin.pidgin' (head 9a5b9a755769ed5ce1855edc6f94e7a1afc35313) to branch 'im.pidgin.pidgin.yaz' (head 9831652b36620e74d1f2eec2ee026e453c9929d0)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 05 Mar 2008 19:41:19 +0000
parents 0966717651b0 (current diff) 04b807c8b98d (diff)
children 25c34e4140d4
files
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/proxy.c	Wed Mar 05 19:37:18 2008 +0000
+++ b/libpurple/proxy.c	Wed Mar 05 19:41:19 2008 +0000
@@ -241,6 +241,20 @@
 	/* If we get this far then we know we're using an HTTP proxy */
 	info.type = PURPLE_PROXY_HTTP;
 
+	/* Free the old fields */
+	if (info.host) {
+		g_free(info.host);
+		info.host = NULL;
+	}
+	if (info.username) {
+		g_free(info.username);
+		info.username = NULL;
+	}
+	if (info.password) {
+		g_free(info.password);
+		info.password = NULL;
+	}
+
 	if (!g_spawn_command_line_sync("gconftool-2 -g /system/http_proxy/host",
 			&info.host, NULL, NULL, NULL))
 		return purple_global_proxy_get_info();