hso: plug small memleak when building devfile

Why do we need the devfile anyway?
This commit is contained in:
Aleksander Morgado
2012-03-28 15:50:43 +02:00
parent b29eb54080
commit f0b02ce321
+4 -1
View File
@@ -56,7 +56,9 @@ grab_port (MMPluginBase *base,
return NULL;
}
/* Build proper devfile path */
/* Build proper devfile path
* TODO: Why do we need to do this? If this is useful, a comment should be
* added explaining why; if it's not useful, let's get rid of it. */
devfile = g_strdup (g_udev_device_get_device_file (port));
if (!devfile) {
if (g_str_equal (subsys, "net")) {
@@ -78,6 +80,7 @@ grab_port (MMPluginBase *base,
return NULL;
}
}
g_free (devfile);
sysfs_path = g_udev_device_get_sysfs_path (port);