diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-28 15:14:42 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-28 15:50:43 +0200 |
commit | f0b02ce321a247b81ad4f2ec3b97525739be6ec2 (patch) | |
tree | 76399bfaacbb01c1f8ab4b4f659565d150f4d6fd | |
parent | b29eb54080aeefbab838b523890af0eee567d948 (diff) |
hso: plug small memleak when building devfile
Why do we need the devfile anyway?
-rw-r--r-- | plugins/option/mm-plugin-hso.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/option/mm-plugin-hso.c b/plugins/option/mm-plugin-hso.c index 2e76f6ce..d6df67f2 100644 --- a/plugins/option/mm-plugin-hso.c +++ b/plugins/option/mm-plugin-hso.c @@ -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); |