mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-16 09:33:48 +02:00
Merge branch 'realloc-ub' into 'main'
gsignal.c: drop an optimization that is undefined behaviour See merge request GNOME/glib!3806
This commit is contained in:
commit
dea4cc66bd
@ -395,17 +395,9 @@ handler_list_ensure (guint signal_id,
|
|||||||
if (!hlbsa)
|
if (!hlbsa)
|
||||||
{
|
{
|
||||||
hlbsa = g_bsearch_array_create (&g_signal_hlbsa_bconfig);
|
hlbsa = g_bsearch_array_create (&g_signal_hlbsa_bconfig);
|
||||||
|
}
|
||||||
hlbsa = g_bsearch_array_insert (hlbsa, &g_signal_hlbsa_bconfig, &key);
|
hlbsa = g_bsearch_array_insert (hlbsa, &g_signal_hlbsa_bconfig, &key);
|
||||||
g_hash_table_insert (g_handler_list_bsa_ht, instance, hlbsa);
|
g_hash_table_insert (g_handler_list_bsa_ht, instance, hlbsa);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GBSearchArray *o = hlbsa;
|
|
||||||
|
|
||||||
hlbsa = g_bsearch_array_insert (o, &g_signal_hlbsa_bconfig, &key);
|
|
||||||
if (hlbsa != o)
|
|
||||||
g_hash_table_insert (g_handler_list_bsa_ht, instance, hlbsa);
|
|
||||||
}
|
|
||||||
return g_bsearch_array_lookup (hlbsa, &g_signal_hlbsa_bconfig, &key);
|
return g_bsearch_array_lookup (hlbsa, &g_signal_hlbsa_bconfig, &key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user