summaryrefslogtreecommitdiff
path: root/src/dhcp.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-07-25 16:37:12 +0200
committerMarcel Holtmann <marcel@holtmann.org>2011-07-25 22:43:44 +0200
commit35689568e18459597cfefd5faebf3270be71b238 (patch)
tree538bd1aa3cc58e611704dd25f25b8e6257f37c9a /src/dhcp.c
parent92c0a3bbf71ea93a49cb20a520d003c147e52871 (diff)
downloadconnman-35689568e18459597cfefd5faebf3270be71b238.tar.gz
connman-35689568e18459597cfefd5faebf3270be71b238.tar.bz2
connman-35689568e18459597cfefd5faebf3270be71b238.zip
dhcp: Fix cleanup
__connman_dhcp_cleanup() is called early in the shutdown process (before device or network).
Diffstat (limited to 'src/dhcp.c')
-rw-r--r--src/dhcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index 20fc5991..8092db15 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -461,6 +461,9 @@ void __connman_dhcp_stop(struct connman_network *network)
{
DBG("");
+ if (network_table == NULL)
+ return;
+
g_hash_table_remove(network_table, network);
}
@@ -479,4 +482,5 @@ void __connman_dhcp_cleanup(void)
DBG("");
g_hash_table_destroy(network_table);
+ network_table = NULL;
}