mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-12 18:53:07 +02: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;
|
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;
|
return NULL;
|
||||||
|
|
||||||
/* Are we the only reference? */
|
/* Are we the only reference? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user