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:
Simon McVittie 2011-12-12 18:58:03 +00:00
parent a48edddc19
commit 93f8f8158f

View File

@ -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);
}