From: Pasi Sjöholm <[email protected]>
DBusMessage message leaks memory if not cleaned when
counter is not found.
---
src/counter.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/counter.c b/src/counter.c
index 06e5daf..8ea6205 100644
--- a/src/counter.c
+++ b/src/counter.c
@@ -133,8 +133,11 @@ void __connman_counter_send_usage(const char *path,
struct connman_counter *counter;
counter = g_hash_table_lookup(counter_table, path);
- if (!counter)
+ if (!counter) {
+ if (message)
+ dbus_message_unref(message);
return;
+ }
dbus_message_set_destination(message, counter->owner);
dbus_message_set_path(message, counter->path);
--
2.1.0
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman