Commit 957fa1be authored by Guido Gunther's avatar Guido Gunther Committed by Guido Gunther
Browse files

fbd-dev-leds: Don't leak color

g_ascii_strdown() creates a copy already.
parent d8f944ed
......@@ -123,7 +123,7 @@ initable_init (GInitable *initable,
enum_name = g_enum_to_string (FBD_TYPE_FEEDBACK_LED_COLOR, i);
c = strrchr (enum_name, '_');
color = g_strdup (g_ascii_strdown (c+1, -1));
color = g_ascii_strdown (c+1, -1);
if (g_strstr_len (name, -1, color)) {
g_autoptr (GError) err = NULL;
guint brightness = g_udev_device_get_sysfs_attr_as_int (dev, "max_brightness");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment