From: Tomas Targownik Date: Thu, 30 Jun 2011 19:30:44 +0000 (-0300) Subject: Bluetooth: Fix memory leak under page timeouts X-Git-Tag: v3.0~41^2~3^2^2~9^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=163f4dabea4e3be485c17e8f08e3a6468ad31cbf;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.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 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; }