Re: [PATCH] dnsproxy: Don't try to destroy NULL hashtable on exit

2015-01-30 Thread Patrik Flykt
On Wed, 2015-01-28 at 22:27 +0200, Slava Monich wrote:
 glib doesn't like it.

Applied, thanks!

Patrik

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH] dnsproxy: Don't try to destroy NULL hashtable on exit

2015-01-28 Thread Slava Monich
glib doesn't like it.
---
 src/dnsproxy.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 9d7ba61..9787b68 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -3872,8 +3872,10 @@ void __connman_dnsproxy_cleanup(void)
cache_timer = 0;
}
 
-   g_hash_table_destroy(cache);
-   cache = NULL;
+   if (cache) {
+   g_hash_table_destroy(cache);
+   cache = NULL;
+   }
 
connman_notifier_unregister(dnsproxy_notifier);
 
-- 
1.8.3.2

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman