summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTomas Targownik <ttargownik@geicp.com>2011-06-30 16:30:44 -0300
committerJaikumar Ganesh <jaikumar@google.com>2011-07-18 12:28:02 -0700
commit1be668d732e91d7a83529b0e2946c0343c1df6be (patch)
tree7d60eaa11eabcad28b5ed2008e0b42d518b74682 /net
parent63be311edbe957027e1f1d4182af68ff70e7a599 (diff)
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')
-rw-r--r--net/bluetooth/hci_conn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index b7ff6e3ee25..5ec0db42316 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -453,6 +453,9 @@ int hci_conn_del(struct hci_conn *conn)
hci_dev_put(hdev);
+ if (conn->handle == 0)
+ kfree(conn);
+
return 0;
}