diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-06-27 10:00:46 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-06-27 10:20:22 +0200 |
commit | 29aeeb1d8096aaea699ce615008945217b29d661 (patch) | |
tree | 144c983edd59b505c3c33e8611fac22134c6837b | |
parent | cf0e60a1fe963f88716b13cd6408b83b88edc32f (diff) | |
download | NetworkManager-bg/parse-var-attr-ref-rh1594887.tar.gz |
libnm-core: fix nm_utils_parse_variant_attributes() usagebg/parse-var-attr-ref-rh1594887
Don't take extra references to GVariants returned by
nm_utils_parse_variant_attributes().
-rw-r--r-- | libnm-core/nm-keyfile.c | 2 | ||||
-rw-r--r-- | libnm-core/nm-utils.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libnm-core/nm-keyfile.c b/libnm-core/nm-keyfile.c index 5c94c35c3e..c40ab2b40c 100644 --- a/libnm-core/nm-keyfile.c +++ b/libnm-core/nm-keyfile.c @@ -472,7 +472,7 @@ fill_route_attributes (GKeyFile *kf, NMIPRoute *route, const char *setting, cons g_hash_table_iter_init (&iter, hash); while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer *) &variant)) { if (nm_ip_route_attribute_validate (name, variant, family, NULL, NULL)) - nm_ip_route_set_attribute (route, name, g_variant_ref (variant)); + nm_ip_route_set_attribute (route, name, variant); } } } diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 92cae1ab95..958bcfc0dd 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -2501,7 +2501,7 @@ nm_utils_tc_action_from_str (const char *str, GError **error) g_hash_table_iter_init (&iter, options); while (g_hash_table_iter_next (&iter, &key, &value)) - nm_tc_action_set_attribute (action, key, g_variant_ref_sink (value)); + nm_tc_action_set_attribute (action, key, value); } return action; |