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:
Michael Catanzaro 2024-10-01 14:04:13 +00:00
commit 04543594d4

View File

@ -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 cant be distinguished */
g_free (bytes);
return result;
}