From 25440a07c3b421134b4376d7db3ee4b7ed57ad98 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Mon, 12 Jul 2021 08:38:02 -0500 Subject: Avoid direct use of libproxy Since hexchat already depends on GLib, it's better to use GProxyResolver instead. This might use libproxy, or not, as appropriate. P.S. This removes a memory safety issue because proxy_list is allocated using malloc(), not g_malloc(), and therefore using g_strfreev() is incorrect. The proper way to free the proxy list returned by libproxy is to use px_proxy_factory_free_proxies() (but nobody does that because it was added in libproxy 0.4.16, which is somewhat recent). --- src/fe-gtk/setup.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/fe-gtk/setup.c') diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 3d003eef..a7e3a15c 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -614,9 +614,7 @@ static const char *const proxytypes[] = N_("SOCKS4"), N_("SOCKS5"), N_("HTTP"), -#ifdef USE_LIBPROXY N_("Auto"), -#endif NULL }; -- cgit 1.4.1