Mercurial > pidgin.yaz
comparison libpurple/proxy.c @ 24049:0bd896cd1b90
Fix a double free. Fixes #7047
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 16 Sep 2008 13:04:39 +0000 |
parents | 71fecd0f4ce6 |
children | d4239c588fcf |
comparison
equal
deleted
inserted
replaced
24046:bcfc98c7a55f | 24049:0bd896cd1b90 |
---|---|
261 | 261 |
262 if (!strcmp(tmp, "true\n")) | 262 if (!strcmp(tmp, "true\n")) |
263 use_same_proxy = TRUE; | 263 use_same_proxy = TRUE; |
264 g_free(tmp); | 264 g_free(tmp); |
265 | 265 |
266 if (!use_same_proxy && !g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_host", | 266 if (!use_same_proxy) { |
267 if (!g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_host", | |
267 &info.host, &err, NULL, NULL)) | 268 &info.host, &err, NULL, NULL)) |
268 return purple_global_proxy_get_info(); | 269 return purple_global_proxy_get_info(); |
269 g_free(err); | 270 g_free(err); |
270 g_strchomp(info.host); | 271 } |
271 | 272 |
272 if (!use_same_proxy && *info.host != '\0') { | 273 if(info.host != NULL) |
274 g_strchomp(info.host); | |
275 | |
276 if (!use_same_proxy && (info.host != NULL) && (*info.host != '\0')) { | |
273 info.type = PURPLE_PROXY_SOCKS5; | 277 info.type = PURPLE_PROXY_SOCKS5; |
274 if (!g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_port", | 278 if (!g_spawn_command_line_sync("gconftool-2 -g /system/proxy/socks_port", |
275 &tmp, &err, NULL, NULL)) | 279 &tmp, &err, NULL, NULL)) |
276 { | 280 { |
277 g_free(info.host); | 281 g_free(info.host); |