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:
1 parent
959db9f0de
commit
349083194d
1 file changed
+1
@@ -280,6 +280,7 @@ ot_variant_new_from_bytes (const GVariantType *type,
|
|||||||
#else
|
#else
|
||||||
gsize size;
|
gsize size;
|
||||||
gconstpointer data = g_bytes_get_data (bytes, &size);
|
gconstpointer data = g_bytes_get_data (bytes, &size);
|
||||||
|
g_bytes_ref (bytes);
|
||||||
return g_variant_new_from_data (type, data, size, trusted,
|
return g_variant_new_from_data (type, data, size, trusted,
|
||||||
(GDestroyNotify)g_bytes_unref, bytes);
|
(GDestroyNotify)g_bytes_unref, bytes);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user