fbd-dev-leds: Don't leak color
g_ascii_strdown() creates a copy already.
This commit is contained in:
committed by
Guido Gunther
parent
d8f944ed30
commit
957fa1be83
+1
-1
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user