--- client/monitor.c | 5 +++++ client/services.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/client/monitor.c b/client/monitor.c index 3c3ca5c..d2f8846 100644 --- a/client/monitor.c +++ b/client/monitor.c @@ -164,6 +164,9 @@ DBusHandlerResult service_property_changed(DBusConnection *connection, if (dbus_message_is_signal(message, "net.connman.Service", "PropertyChanged")) { service_message = get_message(connection, "GetServices"); + if (service_message == NULL) + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + service.name = get_service_name(service_message, (char *) dbus_message_get_path(message)); printf("\n"); @@ -172,6 +175,8 @@ DBusHandlerResult service_property_changed(DBusConnection *connection, dbus_message_get_interface(message), service.name); extract_signal_args(message); + + dbus_message_unref(service_message); } return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; diff --git a/client/services.c b/client/services.c index a7dfe36..e4f177c 100644 --- a/client/services.c +++ b/client/services.c @@ -408,8 +408,10 @@ int set_proxy_manual(DBusConnection *connection, DBusMessage *message, "net.connman.Service", "SetProperty"); - if (message_send == NULL) + if (message_send == NULL) { + g_free(path); return -ENOMEM; + } dbus_message_iter_init_append(message_send, &iter); dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &property); @@ -443,6 +445,8 @@ int set_proxy_manual(DBusConnection *connection, DBusMessage *message, dbus_connection_flush(connection); dbus_message_unref(message_send); + g_free(path); + return 0; } @@ -465,8 +469,10 @@ int set_service_property(DBusConnection *connection, DBusMessage *message, "net.connman.Service", "SetProperty"); - if (message_send == NULL) + if (message_send == NULL) { + g_free(path); return -ENOMEM; + } dbus_message_iter_init_append(message_send, &iter); -- 1.7.12.3 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman