mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
g_variant_byteswap: don't leak serialised.data
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113 Reviewed-by: Matthias Clasen <mclasen@redhat.com>
This commit is contained in:
parent
a48edddc19
commit
93f8f8158f
@ -5109,7 +5109,7 @@ g_variant_byteswap (GVariant *value)
|
||||
|
||||
g_variant_serialised_byteswap (serialised);
|
||||
|
||||
bytes = g_bytes_new (serialised.data, serialised.size);
|
||||
bytes = g_bytes_new_take (serialised.data, serialised.size);
|
||||
new = g_variant_new_from_bytes (g_variant_get_type (value), bytes, TRUE);
|
||||
g_bytes_unref (bytes);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user