diff options
author | Mike Lockwood <> | 2009-03-31 11:05:44 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-31 11:05:44 -0700 |
commit | e9560bdd32f4de436b46913865d98eef722140f9 (patch) | |
tree | b9eb9e3d18e2eafec698f3439a963a54e1b59058 | |
parent | 02e95fd30e347523c759e53ba5e6d7c9bd00f7d0 (diff) | |
download | bluez-e9560bdd32f4de436b46913865d98eef722140f9.tar.gz |
AI 143676: am: CL 143537 Sanity check to make sure the session still exists in auth_cb().
BUG=1744549
Original author: lockwood
Merged from: //branches/cupcake/...
Automated import of CL 143676
-rw-r--r-- | utils/audio/avdtp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/audio/avdtp.c b/utils/audio/avdtp.c index 4710e66a..12fc700d 100644 --- a/utils/audio/avdtp.c +++ b/utils/audio/avdtp.c @@ -3000,6 +3000,11 @@ static void auth_cb(DBusError *derr, void *user_data) struct audio_device *dev; GIOChannel *io; + if (!g_slist_find(sessions, session)) { + error("auth_cb called after session was freed"); + return; + } + if (derr && dbus_error_is_set(derr)) { error("Access denied: %s", derr->message); if (dbus_error_has_name(derr, DBUS_ERROR_NO_REPLY)) { |