dbus_pending_call_cancel() drops the dbus library's internal reference
to DBusPendingCall but we also need to release the reference we got from
dbus_connection_send_with_reply()
---
plugins/ofono.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 5cd8302..eda6ad8 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -401,8 +401,8 @@ static int set_property(struct modem_data *modem,
if (modem->call_set_property) {
DBG("Cancel pending SetProperty");
-
dbus_pending_call_cancel(modem->call_set_property);
+ dbus_pending_call_unref(modem->call_set_property);
modem->call_set_property = NULL;
}
@@ -2340,14 +2340,20 @@ static void remove_modem(gpointer data)
DBG("%s", modem->path);
- if (modem->call_set_property)
+ if (modem->call_set_property) {
dbus_pending_call_cancel(modem->call_set_property);
+ dbus_pending_call_unref(modem->call_set_property);
+ }
- if (modem->call_get_properties)
+ if (modem->call_get_properties) {
dbus_pending_call_cancel(modem->call_get_properties);
+ dbus_pending_call_unref(modem->call_get_properties);
+ }
- if (modem->call_get_contexts)
+ if (modem->call_get_contexts) {
dbus_pending_call_cancel(modem->call_get_contexts);
+ dbus_pending_call_unref(modem->call_get_contexts);
+ }
if (modem->device)
destroy_device(modem);
--
1.8.3.2
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman