avrcp: remove unused dbus reply message

Fix leak of dbus messages being created but not unreferenced after
method returns.
This commit is contained in:
Lucas De Marchi 2011-07-05 17:24:46 -03:00 committed by Johan Hedberg
parent c141fcc366
commit 13568564b1

View File

@ -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);