diff options
Diffstat (limited to 'net/bluetooth/cmtp/core.c')
-rw-r--r-- | net/bluetooth/cmtp/core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index 182254a580e2..b81a01c64aea 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c | |||
@@ -335,10 +335,9 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) | |||
335 | baswap(&src, &bt_sk(sock->sk)->src); | 335 | baswap(&src, &bt_sk(sock->sk)->src); |
336 | baswap(&dst, &bt_sk(sock->sk)->dst); | 336 | baswap(&dst, &bt_sk(sock->sk)->dst); |
337 | 337 | ||
338 | session = kmalloc(sizeof(struct cmtp_session), GFP_KERNEL); | 338 | session = kzalloc(sizeof(struct cmtp_session), GFP_KERNEL); |
339 | if (!session) | 339 | if (!session) |
340 | return -ENOMEM; | 340 | return -ENOMEM; |
341 | memset(session, 0, sizeof(struct cmtp_session)); | ||
342 | 341 | ||
343 | down_write(&cmtp_session_sem); | 342 | down_write(&cmtp_session_sem); |
344 | 343 | ||