changeset 22412:04b807c8b98d

Bring back the lines that free info.whatever on subsequent calls to purple_gnome_proxy_get_info(). Stu pointed out that they ARE needed because 'info' is a static variable. I should have merged these back into the function when I disapproved of d5ef30aafa0c0ecff773017ab7ac542f9ba7b4b4, but holy cow that was a crazy 3-way merge.
author Mark Doliner <mark@kingant.net>
date Wed, 05 Mar 2008 18:17:25 +0000
parents 7ba68075beea
children 288af4cb9884 baf65ce1463f
files libpurple/proxy.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/proxy.c	Wed Mar 05 18:13:11 2008 +0000
+++ b/libpurple/proxy.c	Wed Mar 05 18:17:25 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();