From 76a68c90d5d03c4e037ef00562e0fa907fdccf92 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Mon, 1 Oct 2007 11:49:40 +0000 Subject: serial: fixed get_handles pending call leak --- serial/manager.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/serial/manager.c b/serial/manager.c index 378434e4..ec06ac0e 100644 --- a/serial/manager.c +++ b/serial/manager.c @@ -614,6 +614,12 @@ static int get_record(struct pending_connect *pc, uint32_t handle, DBUS_TYPE_UINT32, &handle, DBUS_TYPE_INVALID); + /* Unref get_handles pending call */ + if (pc->pcall) { + dbus_pending_call_unref(pc->pcall); + pc->pcall = NULL; + } + if (!dbus_connection_send_with_reply(pc->conn, msg, &pc->pcall, -1)) { error("Can't send D-Bus message."); dbus_message_unref(msg); -- cgit