summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2014-02-08 17:33:57 -0500
committerMichael Terry <michael.terry@canonical.com>2014-02-08 17:33:57 -0500
commit1e257eafb6779be88ef415c9d11535d85f072c75 (patch)
tree08412e22f83d94016a86200b0d69862adf9a5b67 /common
parentd623d8b234383ceee5c2d25d588c91b39ad023cb (diff)
downloadlightdm-1e257eafb6779be88ef415c9d11535d85f072c75.tar.gz
Add better cleanup as lightdm daemon closes
Diffstat (limited to 'common')
-rw-r--r--common/user-list.c8
-rw-r--r--common/user-list.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/common/user-list.c b/common/user-list.c
index d64e615f..e97377b3 100644
--- a/common/user-list.c
+++ b/common/user-list.c
@@ -183,6 +183,14 @@ common_user_list_get_instance (void)
return singleton;
}
+void
+common_user_list_cleanup (void)
+{
+ if (singleton)
+ g_object_unref (singleton);
+ singleton = NULL;
+}
+
static CommonUser *
get_user_by_name (CommonUserList *user_list, const gchar *username)
{
diff --git a/common/user-list.h b/common/user-list.h
index 820e0b25..0d38cfe9 100644
--- a/common/user-list.h
+++ b/common/user-list.h
@@ -64,6 +64,8 @@ GType common_user_get_type (void);
CommonUserList *common_user_list_get_instance (void);
+void common_user_list_cleanup (void);
+
gint common_user_list_get_length (CommonUserList *user_list);
CommonUser *common_user_list_get_user_by_name (CommonUserList *user_list, const gchar *username);