From 04888726d1dca7dc879868baa15426dbcb0fc7da Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 14 Sep 2018 17:06:36 +0200 Subject: [PATCH] libnm: document nm_utils_parse_variant_attributes() returning floating references See-also: https://bugzilla.redhat.com/show_bug.cgi?id=1594887 (cherry picked from commit e645aeb12ccefb1fbe18bb33d046ee649de86da0) (cherry picked from commit 74a3d184b0cd0d8fc62d104ac666396da9f07e06) --- libnm-core/nm-utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index b700c7f5fd..950418b970 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -5990,7 +5990,9 @@ attribute_unescape (const char *start, const char *end) * Parse attributes from a string. * * Returns: (transfer full) (element-type utf8 GVariant): a #GHashTable mapping - * attribute names to #GVariant values. + * attribute names to #GVariant values. Warning: the variant are still floating + * references, owned by the hash table. If you take a reference, ensure to sink + * the one of the hash table first. * * Since: 1.8 */