mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Don't dereference the session if it was closed
This commit is contained in:
parent
9cbb5351d6
commit
c72658ac79
@ -1660,7 +1660,7 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
|
||||
gpointer data)
|
||||
{
|
||||
struct avdtp *session = data;
|
||||
struct avdtp_common_header *header = (void *) session->buf;
|
||||
struct avdtp_common_header *header;
|
||||
gsize size;
|
||||
|
||||
debug("session_cb");
|
||||
@ -1668,6 +1668,8 @@ static gboolean session_cb(GIOChannel *chan, GIOCondition cond,
|
||||
if (cond & G_IO_NVAL)
|
||||
return FALSE;
|
||||
|
||||
header = (void *) session->buf;
|
||||
|
||||
if (cond & (G_IO_HUP | G_IO_ERR))
|
||||
goto failed;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user