diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-04-11 11:24:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-22 16:21:23 -0700 |
commit | b8162209f9bfd832fc854cf12779d612df661ee6 (patch) | |
tree | 886c50896776836b6ac96a6605d687f4155e2022 /Makefile | |
parent | c30d6d63c156d6842a6f895493766077773bbf87 (diff) | |
download | kernel_samsung_aries-b8162209f9bfd832fc854cf12779d612df661ee6.zip kernel_samsung_aries-b8162209f9bfd832fc854cf12779d612df661ee6.tar.gz kernel_samsung_aries-b8162209f9bfd832fc854cf12779d612df661ee6.tar.bz2 |
Bluetooth: uart-ldisc: Fix memory leak
This is a partial, self-contained, minimal backport of commit
797fe796c4335b35d95d5326824513befdb5d1e9 upstream which fixes the memory
leak:
Bluetooth: uart-ldisc: Fix memory leak and remove destruct cb
We currently leak the hci_uart object if HCI_UART_PROTO_SET is never set
because the hci-destruct callback will then never be called. This fix
removes the hci-destruct callback and frees the driver internal private
hci_uart object directly on tty-close. We call hci_unregister_dev() here
so the hci-core will never call our callbacks again (except destruct).
Therefore, we can safely free the driver internal data right away and
set the destruct callback to NULL.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions