mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 21:24:16 +08:00
b70fae3807
Changing stream state from STREAMING to IDLE can be associated with side effects under some circumstances (such as terminating bluetoothd during music is streamed). In this case, after connection is lost, stream state changes from STREAMING to IDLE - "avdtp_sep_set_state" is triggered which invokes callback called "stream_state_changed" which internally invokes "avdtp_sep_set_state" (state of stream doesn't change and stays as IDLE) second time and then stream object is freed by "stream_free" at the end of "avdtp_sep_set_state". After returning from callback, first triggered "avdtp_sep_set_state" attempts to free stream object again ("if (state == AVDTP_STATE_IDLE)" condition is still satisfied) and it leads to invalid read/write/free issues (reported by valgrind) in "stream free" body, since "stream" is "alias" pointer to stream object which is already out of date (memory for stream object has been already freed). This patch prevents from this special case by freeing stream object only when it is present on streams list and removing from this list when stream object would be freed. |
||
---|---|---|
attrib | ||
audio | ||
btio | ||
compat | ||
cups | ||
doc | ||
gdbus | ||
health | ||
input | ||
lib | ||
network | ||
plugins | ||
sap | ||
sbc | ||
scripts | ||
serial | ||
src | ||
test | ||
tools | ||
tracer | ||
.gitignore | ||
.mailmap | ||
acinclude.m4 | ||
AUTHORS | ||
bluez.pc.in | ||
bootstrap | ||
bootstrap-configure | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
INSTALL | ||
Makefile.am | ||
Makefile.tools | ||
NEWS | ||
README | ||
TODO |
BlueZ - Bluetooth protocol stack for Linux ****************************************** Copyright (C) 2000-2001 Qualcomm Incorporated Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com> Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org> Compilation and installation ============================ In order to compile Bluetooth utilities you need following software packages: - Linux Bluetooth protocol stack (BlueZ) - GCC compiler - D-Bus library - GLib library - USB library (optional) - Lexical Analyzer (flex, lex) - YACC (yacc, bison, byacc) To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib Configure automatically searches for all required components and packages. To compile and install run: make && make install Information =========== Mailing lists: linux-bluetooth@vger.kernel.org For additional information about the project visit BlueZ web site: http://www.bluez.org