android/AVDTP: Fix not removing start_timer source
Luiz Augusto von Dentz
maintainerPATCH 1/1 android/AVDTP: Fix not removing start_timer source
From: Luiz Augusto von Dentz <[email protected]>
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 <[email protected]> for reporting it.
--- android/avdtp.c | 3 +++ 1 file changed, 3 insertions(+)
android/avdtp.c +3 -0
@@ -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);
Signature · 1 line
1.8.3.1
Johan Hedberg
AppliedHi Luiz,
Quoted 8 lines · Luiz Augusto von Dentz
It is possible that
stream->start_timercan be set onstream_freewhich should then should take care of remove it properly otherwise it can trigger which would very likely cause a crash.Thanks to Hannu Mallat <[email protected]> for reporting it.
--- android/avdtp.c | 3 +++ 1 file changed, 3 insertions(+)
Applied. Thanks.
Johan