From: Tomas Targownik Date: Thu, 30 Jun 2011 19:30:44 +0000 (-0300) Subject: Bluetooth: Fix memory leak under page timeouts X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=163f4dabea4e3be485c17e8f08e3a6468ad31cbf;p=~shefty%2Frdma-dev.git 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 Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index d3a05b9ade7..bcd158f40bb 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; }