diff options
author | Tomas Targownik <ttargownik@geicp.com> | 2011-06-30 16:30:44 -0300 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-07-18 12:28:02 -0700 |
commit | 1be668d732e91d7a83529b0e2946c0343c1df6be (patch) | |
tree | 7d60eaa11eabcad28b5ed2008e0b42d518b74682 /net | |
parent | 63be311edbe957027e1f1d4182af68ff70e7a599 (diff) | |
download | kernel_samsung_espresso10-1be668d732e91d7a83529b0e2946c0343c1df6be.zip kernel_samsung_espresso10-1be668d732e91d7a83529b0e2946c0343c1df6be.tar.gz kernel_samsung_espresso10-1be668d732e91d7a83529b0e2946c0343c1df6be.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')
-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 b7ff6e3..5ec0db4 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; } |