summaryrefslogtreecommitdiff
path: root/shared/nm-glib-aux/nm-enum-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/nm-glib-aux/nm-enum-utils.c')
-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 c0f64b0c33..279eeaeb5b 100644
--- a/shared/nm-glib-aux/nm-enum-utils.c
+++ b/shared/nm-glib-aux/nm-enum-utils.c
@@ -212,8 +212,7 @@ _nm_utils_enum_from_str_full(GType type,
_ASSERT_enum_values_info(type, value_infos);
- str_clone = strdup(str);
- s = nm_str_skip_leading_spaces(str_clone);
+ s = nm_strdup_maybe_a(300, nm_str_skip_leading_spaces(str), &str_clone);
g_strchomp(s);
klass = g_type_class_ref(type);