mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
Merge branch 'wip/chergert/fix-network-address-crash' into 'master'
gnetworkaddress: fix use-after-free for network address See merge request GNOME/glib!611
This commit is contained in:
commit
aa3f7eaac7
@ -1120,12 +1120,17 @@ on_address_timeout (gpointer user_data)
|
|||||||
{
|
{
|
||||||
GNetworkAddressAddressEnumerator *addr_enum = user_data;
|
GNetworkAddressAddressEnumerator *addr_enum = user_data;
|
||||||
|
|
||||||
|
/* Upon completion it may get unref'd by the owner */
|
||||||
|
g_object_ref (addr_enum);
|
||||||
|
|
||||||
/* If ipv6 didn't come in yet, just complete the task */
|
/* If ipv6 didn't come in yet, just complete the task */
|
||||||
if (addr_enum->queued_task != NULL)
|
if (addr_enum->queued_task != NULL)
|
||||||
complete_queued_task (addr_enum, g_steal_pointer (&addr_enum->queued_task),
|
complete_queued_task (addr_enum, g_steal_pointer (&addr_enum->queued_task),
|
||||||
g_steal_pointer (&addr_enum->last_error));
|
g_steal_pointer (&addr_enum->last_error));
|
||||||
|
|
||||||
g_clear_pointer (&addr_enum->wait_source, g_source_unref);
|
g_clear_pointer (&addr_enum->wait_source, g_source_unref);
|
||||||
|
g_object_unref (addr_enum);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user