From 24fc2b639e6fe567633a60dd4d99eca36a0f1323 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 18 Dec 2013 14:29:43 +0200 Subject: [PATCH] android/AVDTP: Fix not removing start_timer source It is possible that stream->start_timer can be set on stream_free which should then should take care of remove it properly otherwise it can trigger which would very likely cause a crash. Thanks to Hannu Mallat for reporting it. --- android/avdtp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/avdtp.c b/android/avdtp.c index 5ae3afc46..3a3380af8 100644 --- a/android/avdtp.c +++ b/android/avdtp.c @@ -670,6 +670,9 @@ static void stream_free(void *data) if (stream->timer) g_source_remove(stream->timer); + if (stream->start_timer > 0) + g_source_remove(stream->start_timer); + if (stream->io) close_stream(stream); -- 2.47.3