mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
avrcp: remove unused dbus reply message
Fix leak of dbus messages being created but not unreferenced after method returns.
This commit is contained in:
parent
c141fcc366
commit
13568564b1
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user