Bluetooth: Fix memory leak under page timeouts
If the remote device is not present, the connections attemp fails and the struct hci_conn was not freed Signed-off-by: Tomas Targownik <ttargownik@geicp.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
parent
9fa7e4f76f
commit
163f4dabea
1 changed files with 3 additions and 0 deletions
|
@ -393,6 +393,9 @@ int hci_conn_del(struct hci_conn *conn)
|
||||||
|
|
||||||
hci_dev_put(hdev);
|
hci_dev_put(hdev);
|
||||||
|
|
||||||
|
if (conn->handle == 0)
|
||||||
|
kfree(conn);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue