From: David Herrmann Date: Sat, 7 Jan 2012 14:47:19 +0000 (+0100) Subject: Bluetooth: uart-ldisc: Fix memory leak and remove destruct cb X-Git-Tag: v3.4-rc1~177^2~112^2~243 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=797fe796c4335b35d95d5326824513befdb5d1e9;p=pandora-kernel.git 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 Acked-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- Reading git-diff-tree failed