summaryrefslogtreecommitdiff
path: root/audio/gateway.c
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2012-04-12 20:32:56 +0530
committerJohan Hedberg <johan.hedberg@intel.com>2012-04-13 12:37:11 +0300
commit8151afd39538207ea907857e44d79081b9e0097f (patch)
treefd299e0adc5dcefbe44c7af7f012e47d1cf0a19a /audio/gateway.c
parent9ec213277b46867fca20aae85ca3f76cec5ba56d (diff)
downloadbluez-8151afd39538207ea907857e44d79081b9e0097f.tar.gz
gateway: Fix D-Bus memory leak in audio
Diffstat (limited to 'audio/gateway.c')
-rw-r--r--audio/gateway.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/gateway.c b/audio/gateway.c
index 131f93f5d..19f8ce36a 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -182,8 +182,11 @@ static gboolean agent_sendfd(struct hf_agent *agent, int fd,
DBUS_TYPE_UINT16, &gw->version,
DBUS_TYPE_INVALID);
- if (dbus_connection_send_with_reply(dev->conn, msg, &call, -1) == FALSE)
+ if (dbus_connection_send_with_reply(dev->conn, msg,
+ &call, -1) == FALSE) {
+ dbus_message_unref(msg);
return FALSE;
+ }
dbus_pending_call_set_notify(call, notify, dev, NULL);
dbus_pending_call_unref(call);