[PATCH] fix call to g_free



---
 lib/libmediaplayerid/mpid-device.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/libmediaplayerid/mpid-device.c b/lib/libmediaplayerid/mpid-device.c
index 31bc8f3..db3d1f8 100644
--- a/lib/libmediaplayerid/mpid-device.c
+++ b/lib/libmediaplayerid/mpid-device.c
@@ -149,7 +149,7 @@ mpid_device_get_device_path (MPIDDevice *device)
 		g_free (mount_path);
 		return device_path;
 	}
-	g_free (mount_path);
+	g_free (mount);
 
 	/* it's not a mount point, so check if it's the path to a mounted device */
 	mounts = g_unix_mounts_get (NULL);
@@ -163,6 +163,7 @@ mpid_device_get_device_path (MPIDDevice *device)
 		g_unix_mount_free (mount);
 	}
 	g_list_free (mounts);
+	g_free(mount_path);
 
 	if (device_path == NULL) {
 		mpid_debug ("unable to find device path for mount point %s\n", device->input_path);
-- 
1.6.3.3


--------------060406020800080609060909--


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]