pidgin: 0de80ccd: Prevent double freeing when we don't get...

datallah at pidgin.im datallah at pidgin.im
Mon Jun 2 23:55:56 EDT 2008


-----------------------------------------------------------------
Revision: 0de80ccd44f6ce7fe6942baa1e0dfc95a2878d05
Ancestor: ffe11b98734ebc297dc36ad3e623bc945fdb5cc4
Author: datallah at pidgin.im
Date: 2008-06-03T03:53:14
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0de80ccd44f6ce7fe6942baa1e0dfc95a2878d05

Modified files:
        libpurple/proxy.c

ChangeLog: 

Prevent double freeing when we don't get the proxy data we're expecting from
gconftool. Fixes #5663.

-------------- next part --------------
============================================================
--- libpurple/proxy.c	a05468748e9b9038e90aaccc835057b75b112753
+++ libpurple/proxy.c	09e6a820079010712018d46f35ba89c3bd711ed9
@@ -265,6 +265,7 @@ purple_gnome_proxy_get_info(void)
 				"'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 @@ purple_gnome_proxy_get_info(void)
 			&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 @@ purple_gnome_proxy_get_info(void)
 			&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 @@ purple_gnome_proxy_get_info(void)
 			&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);


More information about the Commits mailing list