# HG changeset patch # User Stu Tomlinson # Date 1221570279 0 # Node ID 0bd896cd1b9066525c598f7b7e10ae59b05a13c8 # Parent bcfc98c7a55ffecd2f6f42797b47c9f93d28bd70 Fix a double free. Fixes #7047 diff -r bcfc98c7a55f -r 0bd896cd1b90 libpurple/proxy.c --- a/libpurple/proxy.c Mon Sep 15 03:06:03 2008 +0000 +++ b/libpurple/proxy.c Tue Sep 16 13:04:39 2008 +0000 @@ -263,13 +263,17 @@ use_same_proxy = TRUE; g_free(tmp); - if (!use_same_proxy && !g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_host", + if (!use_same_proxy) { + if (!g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_host", &info.host, &err, NULL, NULL)) - return purple_global_proxy_get_info(); - g_free(err); - g_strchomp(info.host); + return purple_global_proxy_get_info(); + g_free(err); + } - if (!use_same_proxy && *info.host != '\0') { + if(info.host != NULL) + g_strchomp(info.host); + + if (!use_same_proxy && (info.host != NULL) && (*info.host != '\0')) { info.type = PURPLE_PROXY_SOCKS5; if (!g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_port", &tmp, &err, NULL, NULL))