summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Lockwood <>2009-03-30 15:24:03 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-30 15:24:03 -0700
commitc46b54a59ed5d8cd25b83b962bf583c4e9c9f9f8 (patch)
treeb9eb9e3d18e2eafec698f3439a963a54e1b59058
parent30440a3862bac73587249e820d88dbec12410098 (diff)
downloadbluez-c46b54a59ed5d8cd25b83b962bf583c4e9c9f9f8.tar.gz
AI 143537: Sanity check to make sure the session still exists in auth_cb().
BUG=1744549 Automated import of CL 143537
-rw-r--r--utils/audio/avdtp.c5
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)) {