提交 c8eb9690 编写于 作者: B Brian Gix 提交者: Gustavo F. Padovan

Bluetooth: Cleanup blkcipher on SMP termination

The blkcipher must be freed to avoid memory leak.
Signed-off-by: NBrian Gix <bgix@codeaurora.org>
Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
上级 1143d458
......@@ -379,7 +379,15 @@ static struct smp_chan *smp_chan_create(struct l2cap_conn *conn)
void smp_chan_destroy(struct l2cap_conn *conn)
{
kfree(conn->smp_chan);
struct smp_chan *smp = conn->smp_chan;
clear_bit(HCI_CONN_LE_SMP_PEND, &conn->hcon->pend);
if (smp->tfm)
crypto_free_blkcipher(smp->tfm);
kfree(smp);
conn->smp_chan = NULL;
hci_conn_put(conn->hcon);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册