From 7cc037eb581464a46e6062b8963fa6a1560c7904 Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Mon, 5 Sep 2016 15:26:38 +0900 Subject: [PATCH] Remove destructor function Some program may use vconf-buxton api not in main thread. When main threads exits the destructor may cause crash. Change-Id: I97df4c234078e305083f5c9514c234ffb6eccc19 Signed-off-by: Semun Lee --- lib/buxton2.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/buxton2.c b/lib/buxton2.c index d35f6b7..84d0db1 100644 --- a/lib/buxton2.c +++ b/lib/buxton2.c @@ -2432,17 +2432,3 @@ EXPORT int buxton_open(struct buxton_client **client, return buxton_open_full(client, true, callback, user_data); } -__attribute__((destructor)) -static void buxton_client_exit(void) -{ - GList *l; - GList *n; - - pthread_mutex_lock(&clients_lock); - for (l = clients, n = g_list_next(l); l; l = n, n = g_list_next(n)) - free_client(l->data); - - clients = NULL; - pthread_mutex_unlock(&clients_lock); -} - -- 2.7.4