mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
Merge branch 'gbytes-double-free' into 'main'
gbytes: Add an assertion to placate static analysis See merge request GNOME/glib!4323
This commit is contained in:
commit
04543594d4
@ -490,6 +490,7 @@ try_steal_and_unref (GBytes *bytes,
|
||||
{
|
||||
*size = bytes->size;
|
||||
result = (gpointer)bytes->data;
|
||||
g_assert (result != NULL); /* otherwise the case of @bytes being freed can’t be distinguished */
|
||||
g_free (bytes);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user