fp-device: Do not duplicate udev paths strings

This is happening already internally when using g_value_set_string
This commit is contained in:
Marco Trevisan (Treviño)
2024-06-17 20:59:45 +02:00
committed by Marco Trevisan
parent dd6f020378
commit 3f70bde21c

View File

@@ -292,14 +292,14 @@ fp_device_get_property (GObject *object,
case PROP_FPI_UDEV_DATA_SPIDEV: case PROP_FPI_UDEV_DATA_SPIDEV:
if (cls->type == FP_DEVICE_TYPE_UDEV) if (cls->type == FP_DEVICE_TYPE_UDEV)
g_value_set_string (value, g_strdup (priv->udev_data.spidev_path)); g_value_set_string (value, priv->udev_data.spidev_path);
else else
g_value_set_string (value, NULL); g_value_set_string (value, NULL);
break; break;
case PROP_FPI_UDEV_DATA_HIDRAW: case PROP_FPI_UDEV_DATA_HIDRAW:
if (cls->type == FP_DEVICE_TYPE_UDEV) if (cls->type == FP_DEVICE_TYPE_UDEV)
g_value_set_string (value, g_strdup (priv->udev_data.hidraw_path)); g_value_set_string (value, priv->udev_data.hidraw_path);
else else
g_value_set_string (value, NULL); g_value_set_string (value, NULL);
break; break;