Thread (2 messages) flat view 2 messages, 2 authors, 2011-10-20
STALE5437d

[PATCH] avdtp: check if the socket is valid

From: Gustavo F. Padovan <hidden>
Date: 2011-10-18 20:03:06
Subsystem: the rest · Maintainer: Linus Torvalds

From: "Gustavo F. Padovan" <redacted>

---
 audio/avdtp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/audio/avdtp.c b/audio/avdtp.c
index d3568ba..08860d2 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -523,6 +523,8 @@ static gboolean avdtp_send(struct avdtp *session, uint8_t transaction,
 	}
 
 	sock = g_io_channel_unix_get_fd(session->io);
+	if (!sock)
+		return FALSE;
 
 	/* Single packet - no fragmentation */
 	if (sizeof(struct avdtp_single_header) + len <= session->omtu) {
-- 
1.7.6.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help