mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-16 12:28:48 +02:00
gunixmounts: Remove pending sources when finalizing
mtab_file_changed_id is not currently removed when finalizing, which could potentially lead to segfaults. Let's remove the source when finalizing to avoid this.
This commit is contained in:
parent
ab278c0072
commit
501558eaa1
@ -1861,6 +1861,12 @@ mount_monitor_stop (void)
|
|||||||
g_object_unref (mtab_monitor);
|
g_object_unref (mtab_monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mtab_file_changed_id)
|
||||||
|
{
|
||||||
|
g_source_remove (mtab_file_changed_id);
|
||||||
|
mtab_file_changed_id = 0;
|
||||||
|
}
|
||||||
|
|
||||||
g_list_free_full (mount_poller_mounts, (GDestroyNotify) g_unix_mount_free);
|
g_list_free_full (mount_poller_mounts, (GDestroyNotify) g_unix_mount_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user