changeset 23274:242fd82b5fe6

Prevent double freeing when we don't get the proxy data we're expecting from gconftool. Fixes #5663.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 03 Jun 2008 03:53:14 +0000
parents 775994d49136
children d9767a3993af
files libpurple/proxy.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/proxy.c	Tue Jun 03 00:10:46 2008 +0000
+++ b/libpurple/proxy.c	Tue Jun 03 03:53:14 2008 +0000
@@ -265,6 +265,7 @@
 				"'manual' but no proxy server is specified.  Using "
 				"Pidgin's proxy settings instead.\n");
 		g_free(info.host);
+		info.host = NULL;
 		return purple_global_proxy_get_info();
 	}
 
@@ -272,6 +273,7 @@
 			&info.username, NULL, NULL, NULL))
 	{
 		g_free(info.host);
+		info.host = NULL;
 		return purple_global_proxy_get_info();
 	}
 	g_strchomp(info.username);
@@ -280,7 +282,9 @@
 			&info.password, NULL, NULL, NULL))
 	{
 		g_free(info.host);
+		info.host = NULL;
 		g_free(info.username);
+		info.username = NULL;
 		return purple_global_proxy_get_info();
 	}
 	g_strchomp(info.password);
@@ -289,8 +293,11 @@
 			&tmp, NULL, NULL, NULL))
 	{
 		g_free(info.host);
+		info.host = NULL;
 		g_free(info.username);
+		info.username = NULL;
 		g_free(info.password);
+		info.password = NULL;
 		return purple_global_proxy_get_info();
 	}
 	info.port = atoi(tmp);