diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index c304a7a..7a441e7 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -1392,36 +1392,29 @@ static gboolean
 mount_change_poller (gpointer user_data)
 {
   GUnixMountMonitor *mount_monitor;
-  GList *current_mounts;
+  GList *current_mounts, *l1, *l2;
   gboolean has_changed = FALSE;
 
   mount_monitor = user_data;
   current_mounts = _g_get_unix_mounts ();
 
-  if (g_list_length (current_mounts) != g_list_length (mount_monitor->mount_poller_mounts))
-    {
-      g_list_foreach (mount_monitor->mount_poller_mounts, (GFunc)g_unix_mount_free, NULL);
-      has_changed = TRUE;
-    }
-  else
+  
+  
+  for (l1 = current_mounts, l2 = mount_monitor->mount_poller_mounts;
+       l1 != NULL && l2 != NULL;
+       l1 = l1->next, l2 = l2->next)
     {
-      int i;
+      GUnixMountEntry *m1 = l1->data;
+      GUnixMountEntry *m2 = l2->data;
 
-      for (i = 0; i < g_list_length (current_mounts); i++)
-        {
-          GUnixMountEntry *m1;
-          GUnixMountEntry *m2;
-
-          m1 = (GUnixMountEntry *)g_list_nth_data (current_mounts, i);
-          m2 = (GUnixMountEntry *)g_list_nth_data (mount_monitor->mount_poller_mounts, i);
-          if (! has_changed && g_unix_mount_compare (m1, m2) != 0)
-            has_changed = TRUE;
-
-          g_unix_mount_free (m2);
-        }
+      if (!has_changed && g_unix_mount_compare (m1, m2) != 0)
+        has_changed = TRUE;
     }
 
-  g_list_free (mount_monitor->mount_poller_mounts);
+  if (l1 != NULL || l2 != NULL)
+    has_changed = TRUE;
+
+  g_list_free_full (mount_monitor->mount_poller_mounts, (GDestroyNotify)g_unix_mount_free);
   mount_monitor->mount_poller_mounts = current_mounts;
 
   if (has_changed)
