summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-10-02 17:54:40 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-10-02 17:54:40 +0000
commit4e7fe8b13bd4cd3c82da00e812e812898a366b3b (patch)
tree02dd3a183081904aecaad7c72317197887021add /input
parentb2df0e92432477022e06bbc6df65a6f394818ee2 (diff)
input: minor leak and code standard
Diffstat (limited to 'input')
-rw-r--r--input/device.c3
-rw-r--r--input/manager.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/input/device.c b/input/device.c
index 4c485736..59dbc5bb 100644
--- a/input/device.c
+++ b/input/device.c
@@ -665,7 +665,8 @@ static gboolean interrupt_connect_cb(GIOChannel *chan,
}
idev->intr_sk = isk;
- err = hidp_connadd(&idev->src, &idev->dst, idev->ctrl_sk, idev->intr_sk, idev->name);
+ err = hidp_connadd(&idev->src, &idev->dst,
+ idev->ctrl_sk, idev->intr_sk, idev->name);
if (err < 0)
goto failed;
diff --git a/input/manager.c b/input/manager.c
index 5dfb0641..1468b910 100644
--- a/input/manager.c
+++ b/input/manager.c
@@ -140,6 +140,7 @@ static int get_record(struct pending_req *pr, uint32_t handle,
if (dbus_connection_send_with_reply(pr->conn, msg, &pending, -1) == FALSE) {
error("Can't send D-Bus message.");
+ dbus_message_unref(msg);
return -1;
}
@@ -158,7 +159,7 @@ static int get_handles(struct pending_req *pr, const char *uuid,
char addr[18];
const char *paddr = addr;
- msg = dbus_message_new_method_call("org.bluez", pr->adapter_path,
+ msg = dbus_message_new_method_call("org.bluez", pr->adapter_path,
"org.bluez.Adapter", "GetRemoteServiceHandles");
if (!msg)
return -1;
@@ -171,6 +172,7 @@ static int get_handles(struct pending_req *pr, const char *uuid,
if (dbus_connection_send_with_reply(pr->conn, msg, &pending, -1) == FALSE) {
error("Can't send D-Bus message.");
+ dbus_message_unref(msg);
return -1;
}