mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gbytes: Fix check in try_steal_and_unref
Need to check if the user data is equal to the data, before taking the data out of the GBytes! Bug #670139.
This commit is contained in:
parent
7895706c82
commit
2bdec0c2f2
@ -407,7 +407,8 @@ try_steal_and_unref (GBytes *bytes,
|
||||
{
|
||||
gpointer result;
|
||||
|
||||
if (bytes->free_func != free_func || bytes->data == NULL)
|
||||
if (bytes->free_func != free_func || bytes->data == NULL ||
|
||||
bytes->user_data != bytes->data)
|
||||
return NULL;
|
||||
|
||||
/* Are we the only reference? */
|
||||
|
Loading…
Reference in New Issue
Block a user