diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-07 15:54:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-07 15:54:25 +0100 |
commit | 3b6fe95a07a1bb13784df866aa75c7bcc28529e3 (patch) | |
tree | 9d27a8823f95be0274fa983021210cb70d414075 /net/bluetooth/cmtp/core.c | |
parent | 4f7946eca787baa0f66b4a508595b768a4772f3f (diff) | |
parent | 5618955c4269b07c8177f88a8075d4879e74cd27 (diff) | |
download | linux-3b6fe95a07a1bb13784df866aa75c7bcc28529e3.tar.bz2 |
Merge branch 'topic/pci-cleanup' into for-next
Diffstat (limited to 'net/bluetooth/cmtp/core.c')
-rw-r--r-- | net/bluetooth/cmtp/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index 67fe5e84e68f..278a194e6af4 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c @@ -334,6 +334,9 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) BT_DBG(""); + if (!l2cap_is_socket(sock)) + return -EBADFD; + session = kzalloc(sizeof(struct cmtp_session), GFP_KERNEL); if (!session) return -ENOMEM; |