otutil: Correctly add ref to bytes when creating GVariant

This one went undiscovered for a while because it turned out we
weren't using it...
This commit is contained in:
Colin Walters 2014-04-29 08:53:28 -04:00
parent 959db9f0de
commit 349083194d

View File

@ -280,6 +280,7 @@ ot_variant_new_from_bytes (const GVariantType *type,
#else
gsize size;
gconstpointer data = g_bytes_get_data (bytes, &size);
g_bytes_ref (bytes);
return g_variant_new_from_data (type, data, size, trusted,
(GDestroyNotify)g_bytes_unref, bytes);
#endif