Diff between 27a52a9ccb33aecfd75890841c9333ca6b1db809 and 09b6fbef703b8537775c3e923fa07b128a1fda0c
Changed Files
| File | Additions | Deletions | Status |
| audio/avdtp.c | +7 | -1 | modified |
Full Patch
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 252810e..7e398db 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -3861,9 +3861,15 @@ void avdtp_exit(const bdaddr_t *src)
if (!server)
return;
- for (l = server->sessions; l; l = l->next) {
+ l = server->sessions;
+ while (l) {
struct avdtp *session = l->data;
+ l = l->next;
+ /* value of l pointer should be updated before invoking
+ * connection_lost since it internally uses avdtp_unref
+ * which operates on server->session list as well
+ */
connection_lost(session, -ECONNABORTED);
}