diff options
author | Tomas Targownik <ttargownik@geicp.com> | 2011-06-30 16:30:44 -0300 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-30 16:32:52 -0300 |
commit | 163f4dabea4e3be485c17e8f08e3a6468ad31cbf (patch) | |
tree | 1fab5a250904d550f5c4c8ce206db2da9f89201e /net/bluetooth | |
parent | 9fa7e4f76f3658ba1f44fbdb95c77e7df3f53f95 (diff) | |
download | kernel_samsung_crespo-163f4dabea4e3be485c17e8f08e3a6468ad31cbf.zip kernel_samsung_crespo-163f4dabea4e3be485c17e8f08e3a6468ad31cbf.tar.gz kernel_samsung_crespo-163f4dabea4e3be485c17e8f08e3a6468ad31cbf.tar.bz2 |
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_conn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index d3a05b9..bcd158f 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -393,6 +393,9 @@ int hci_conn_del(struct hci_conn *conn) hci_dev_put(hdev); + if (conn->handle == 0) + kfree(conn); + return 0; } |