[ostree] otutil: Correctly add ref to bytes when creating GVariant
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] otutil: Correctly add ref to bytes when creating GVariant
- Date: Tue, 29 Apr 2014 15:52:02 +0000 (UTC)
commit 349083194d2064abf657494a15fc4bf456d80efd
Author: Colin Walters <walters verbum org>
Date: Tue Apr 29 08:53:28 2014 -0400
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...
src/libotutil/ot-variant-utils.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/libotutil/ot-variant-utils.c b/src/libotutil/ot-variant-utils.c
index 0f8e4be..24e5b55 100644
--- a/src/libotutil/ot-variant-utils.c
+++ b/src/libotutil/ot-variant-utils.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]