Diff between 601edc34f7e10e2068a99a2e0d59026b067a8d48 and 3898fc9d9d65b17e3e5d87bc1a3eb06cdab46da6

Changed Files

File Additions Deletions Status
android/hal-sock.c +1 -1 modified

Full Patch

diff --git a/android/hal-sock.c b/android/hal-sock.c
index f45be30..301c77f 100644
--- a/android/hal-sock.c
+++ b/android/hal-sock.c
@@ -54,7 +54,7 @@ static bt_status_t sock_listen(btsock_type_t type, const char *service_name,
 					const uint8_t *uuid, int chan,
 					int *sock, int flags)
 {
-	if ((!uuid && chan <= 0) || !sock) {
+	if ((!uuid && chan <= 0) || !sock || !type) {
 		error("Invalid params: uuid %s, chan %d, sock %p",
 						btuuid2str(uuid), chan, sock);
 		return BT_STATUS_PARM_INVALID;