diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-03-26 19:11:57 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-03-26 19:11:57 +0000 |
commit | 1e3f6fcf0d53335e6fd8456c11357c5b13d51006 (patch) | |
tree | 82f3fc3ed240304a69f4be97ca04bf1b61aaa024 /network | |
parent | daf9e4f8a6fd95b682d26e3bdd965248de30c148 (diff) |
network: removed memory leak(servers/connections list)
Diffstat (limited to 'network')
-rw-r--r-- | network/manager.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/network/manager.c b/network/manager.c index 83cbaa14..915f1a4b 100644 --- a/network/manager.c +++ b/network/manager.c @@ -306,11 +306,15 @@ static void manager_free(struct manager *mgr) if (!mgr) return; - if (mgr->servers) + if (mgr->servers) { + g_slist_foreach(mgr->servers, (GFunc)g_free, NULL); g_slist_free(mgr->servers); + } - if (mgr->connections) + if (mgr->connections) { + g_slist_foreach(mgr->connections, (GFunc)g_free, NULL); g_slist_free(mgr->connections); + } g_free (mgr); bnep_kill_all_connections(); |