Skip to content

Commit

Permalink
Bluetooth: Fix memory leak under page timeouts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Targownik authored and Gustavo F. Padovan committed Jun 30, 2011
1 parent 9fa7e4f commit 163f4da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ int hci_conn_del(struct hci_conn *conn)

hci_dev_put(hdev);

if (conn->handle == 0)
kfree(conn);

return 0;
}

Expand Down

0 comments on commit 163f4da

Please sign in to comment.