mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
gproxyaddressenumerator: Fix string leakage on an invalid input
This commit is contained in:
parent
b293fc5376
commit
e81c9098b0
@ -262,8 +262,12 @@ g_proxy_address_enumerator_next (GSocketAddressEnumerator *enumerator,
|
|||||||
}
|
}
|
||||||
dest_protocol = g_uri_parse_scheme (priv->dest_uri);
|
dest_protocol = g_uri_parse_scheme (priv->dest_uri);
|
||||||
|
|
||||||
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (priv->proxy_address),
|
if (!G_IS_INET_SOCKET_ADDRESS (priv->proxy_address))
|
||||||
NULL);
|
{
|
||||||
|
g_free (dest_hostname);
|
||||||
|
g_free (dest_protocol);
|
||||||
|
}
|
||||||
|
g_return_val_if_fail (G_IS_INET_SOCKET_ADDRESS (priv->proxy_address), NULL);
|
||||||
|
|
||||||
inetsaddr = G_INET_SOCKET_ADDRESS (priv->proxy_address);
|
inetsaddr = G_INET_SOCKET_ADDRESS (priv->proxy_address);
|
||||||
inetaddr = g_inet_socket_address_get_address (inetsaddr);
|
inetaddr = g_inet_socket_address_get_address (inetsaddr);
|
||||||
@ -352,6 +356,11 @@ return_result (GTask *task)
|
|||||||
}
|
}
|
||||||
dest_protocol = g_uri_parse_scheme (priv->dest_uri);
|
dest_protocol = g_uri_parse_scheme (priv->dest_uri);
|
||||||
|
|
||||||
|
if (!G_IS_INET_SOCKET_ADDRESS (priv->proxy_address))
|
||||||
|
{
|
||||||
|
g_free (dest_hostname);
|
||||||
|
g_free (dest_protocol);
|
||||||
|
}
|
||||||
g_return_if_fail (G_IS_INET_SOCKET_ADDRESS (priv->proxy_address));
|
g_return_if_fail (G_IS_INET_SOCKET_ADDRESS (priv->proxy_address));
|
||||||
|
|
||||||
inetsaddr = G_INET_SOCKET_ADDRESS (priv->proxy_address);
|
inetsaddr = G_INET_SOCKET_ADDRESS (priv->proxy_address);
|
||||||
|
Loading…
Reference in New Issue
Block a user