summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-09 08:53:05 +0200
committerThomas Haller <thaller@redhat.com>2019-08-16 08:16:02 +0200
commitc1e40a4f39da03ff2a398830bbf6d2c3d59b24e3 (patch)
treed8d8124816412a849ebc1fd1c8b54faaf96b66b8 /shared
parent78b6fd47dcee24a4709b4b9c5a30485863eea2c0 (diff)
downloadNetworkManager-c1e40a4f39da03ff2a398830bbf6d2c3d59b24e3.tar.gz
shared: use nm_auto_unref_gtypeclass in _nm_utils_enum_from_str_full()
Diffstat (limited to 'shared')
-rw-r--r--shared/nm-glib-aux/nm-enum-utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shared/nm-glib-aux/nm-enum-utils.c b/shared/nm-glib-aux/nm-enum-utils.c
index b16267a5e1..19ce9a41e6 100644
--- a/shared/nm-glib-aux/nm-enum-utils.c
+++ b/shared/nm-glib-aux/nm-enum-utils.c
@@ -225,7 +225,7 @@ _nm_utils_enum_from_str_full (GType type,
char **err_token,
const NMUtilsEnumValueInfo *value_infos)
{
- GTypeClass *klass;
+ nm_auto_unref_gtypeclass GTypeClass *klass = NULL;
gboolean ret = FALSE;
int value = 0;
gs_free char *str_clone = NULL;
@@ -317,7 +317,6 @@ _nm_utils_enum_from_str_full (GType type,
NM_SET_OUT (err_token, !ret && s[0] ? g_strdup (s) : NULL);
NM_SET_OUT (out_value, ret ? value : 0);
- g_type_class_unref (klass);
return ret;
}