From f0b02ce321a247b81ad4f2ec3b97525739be6ec2 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 28 Mar 2012 15:14:42 +0200 Subject: [PATCH] hso: plug small memleak when building devfile Why do we need the devfile anyway? --- plugins/option/mm-plugin-hso.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);