Discussion:
[PATCH] service: Fix minor memory leak on exit
(too old to reply)
Slava Monich
2015-10-20 14:07:28 UTC
Permalink
services_notify->add and services_notify->remove are always created
and have to be always destroyed.
---
src/service.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/service.c b/src/service.c
index 196f6b5..02a6844 100644
--- a/src/service.c
+++ b/src/service.c
@@ -7118,9 +7118,10 @@ void __connman_service_cleanup(void)
if (services_notify->id != 0) {
g_source_remove(services_notify->id);
service_send_changed(NULL);
- g_hash_table_destroy(services_notify->remove);
- g_hash_table_destroy(services_notify->add);
}
+
+ g_hash_table_destroy(services_notify->remove);
+ g_hash_table_destroy(services_notify->add);
g_free(services_notify);

dbus_connection_unref(connection);
--
1.9.1
Patrik Flykt
2015-10-21 10:04:45 UTC
Permalink
Post by Slava Monich
services_notify->add and services_notify->remove are always created
and have to be always destroyed.
Applied, thanks!

Patrik

Loading...