summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-15 15:16:22 +0200
committerThomas Haller <thaller@redhat.com>2017-05-15 15:16:22 +0200
commit234bc0adcfeb97f6f293c1f862c68bf7263a219d (patch)
treef5a981ea7345973a69cb85a9b2a16efec3157713
parentefafc98147c202d3a754823e2c8a2cc305314a9a (diff)
downloadNetworkManager-234bc0adcfeb97f6f293c1f862c68bf7263a219d.tar.gz
cli: fix use-after-free in _get_fcn_gobject_enum()
Fixes: ddfff04a457444ee9a7c7e85d08e1d7213b3ab6e
-rw-r--r--clients/common/nm-meta-setting-desc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c
index ff40b54720..506c2dfed6 100644
--- a/clients/common/nm-meta-setting-desc.c
+++ b/clients/common/nm-meta-setting-desc.c
@@ -755,7 +755,7 @@ _get_fcn_gobject_enum (ARGS_GET_FCN)
&& !G_IS_ENUM_CLASS (gtype_class ?: (gtype_class = g_type_class_ref (gtype))))
? g_strdup_printf ("0x%"G_GINT64_FORMAT, v)
: g_strdup_printf ("%"G_GINT64_FORMAT, v);
- RETURN_STR_TO_FREE (s);
+ RETURN_STR_TO_FREE (g_steal_pointer (&s));
}
/* the gobject_enum.value_infos are currently ignored for the getter. They