* [PATCH] avrcp: remove unused dbus reply message
@ 2011-07-05 20:24 Lucas De Marchi
2011-07-10 7:41 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Lucas De Marchi @ 2011-07-05 20:24 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Lucas De Marchi
Fix leak of dbus messages being created but not unreferenced after
method returns.
---
audio/control.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/audio/control.c b/audio/control.c
index defbbc8..c3ef737 100644
--- a/audio/control.c
+++ b/audio/control.c
@@ -1045,13 +1045,8 @@ static DBusMessage *volume_up(DBusConnection *conn, DBusMessage *msg,
{
struct audio_device *device = data;
struct control *control = device->control;
- DBusMessage *reply;
int err;
- reply = dbus_message_new_method_return(msg);
- if (!reply)
- return NULL;
-
if (control->state != AVCTP_STATE_CONNECTED)
return btd_error_not_connected(msg);
@@ -1070,13 +1065,8 @@ static DBusMessage *volume_down(DBusConnection *conn, DBusMessage *msg,
{
struct audio_device *device = data;
struct control *control = device->control;
- DBusMessage *reply;
int err;
- reply = dbus_message_new_method_return(msg);
- if (!reply)
- return NULL;
-
if (control->state != AVCTP_STATE_CONNECTED)
return btd_error_not_connected(msg);
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] avrcp: remove unused dbus reply message
2011-07-05 20:24 [PATCH] avrcp: remove unused dbus reply message Lucas De Marchi
@ 2011-07-10 7:41 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-07-10 7:41 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth
Hi Lucas,
On Tue, Jul 05, 2011, Lucas De Marchi wrote:
> Fix leak of dbus messages being created but not unreferenced after
> method returns.
> ---
> audio/control.c | 10 ----------
> 1 files changed, 0 insertions(+), 10 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-10 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05 20:24 [PATCH] avrcp: remove unused dbus reply message Lucas De Marchi
2011-07-10 7:41 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).