summaryrefslogtreecommitdiff
path: root/notification-ex/dbus_sender.cc
diff options
context:
space:
mode:
Diffstat (limited to 'notification-ex/dbus_sender.cc')
-rw-r--r--notification-ex/dbus_sender.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/notification-ex/dbus_sender.cc b/notification-ex/dbus_sender.cc
index 72a4b08..9d6bcdb 100644
--- a/notification-ex/dbus_sender.cc
+++ b/notification-ex/dbus_sender.cc
@@ -130,7 +130,7 @@ GDBusMessage* DBusSender::Impl::MethodCall(string appid, string method_name,
GDBusMessage* reply = g_dbus_connection_send_message_with_reply_sync(
DBusConnectionManager::GetInst().GetConnection(), msg,
G_DBUS_SEND_MESSAGE_FLAGS_NONE, -1, NULL, NULL, &err);
-
+ g_object_unref(msg);
return reply;
}
@@ -156,6 +156,8 @@ std::list<Bundle> DBusSender::Request(const IEventInfo& info) {
if (iter)
g_variant_iter_free(iter);
+ if (reply)
+ g_object_unref(reply);
return ret_list;
}
@@ -172,6 +174,8 @@ int DBusSender::RequestNumber(const IEventInfo& info) {
int num;
g_variant_get(reply_body, "(i)", &num);
+ if (reply)
+ g_object_unref(reply);
return num;
}