diff libpurple/proxy.c @ 22418:6eb0749ad46c

disapproval of revision 'd5ef30aafa0c0ecff773017ab7ac542f9ba7b4b4'
author Mark Doliner <mark@kingant.net>
date Wed, 05 Mar 2008 18:11:02 +0000
parents c5a3a92255f5
children 7ba68075beea
line wrap: on
line diff
--- a/libpurple/proxy.c	Wed Mar 05 09:40:16 2008 +0000
+++ b/libpurple/proxy.c	Wed Mar 05 18:11:02 2008 +0000
@@ -233,6 +233,20 @@
 		g_free(tmp);
 		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;
+		}
+
 		/* Get the new ones */
 		if (!g_spawn_command_line_sync("gconftool-2 -g /system/http_proxy/host", &info.host,
 					       NULL, NULL, NULL))