[glib/wip/oholy/gunixmountmonitor-thread-safe: 4/4] gunixmounts: Remove pending sources when finalizing
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/oholy/gunixmountmonitor-thread-safe: 4/4] gunixmounts: Remove pending sources when finalizing
- Date: Tue, 18 Feb 2020 08:21:25 +0000 (UTC)
commit 501558eaa12d2b7fb61815a96d56b97ea1b5656b
Author: Ondrej Holy <oholy redhat com>
Date: Mon Feb 17 11:20:17 2020 +0100
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.
gio/gunixmounts.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index 1f7077c11..1880d9926 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -1861,6 +1861,12 @@ mount_monitor_stop (void)
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]