[PATCH] Fix crash while exiting when endpoint has a a2dp stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.dentz-von@xxxxxxxxx>

After releasing the endpoint should not be used anymore.
---
 audio/a2dp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/audio/a2dp.c b/audio/a2dp.c
index 8595350..88c280a 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -1517,8 +1517,10 @@ proceed:
 
 static void a2dp_unregister_sep(struct a2dp_sep *sep)
 {
-	if (sep->endpoint)
+	if (sep->endpoint) {
 		media_endpoint_release(sep->endpoint);
+		sep->endpoint = NULL;
+	}
 
 	avdtp_unregister_sep(sep->lsep);
 	g_free(sep);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux