diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-10-25 10:29:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-31 10:10:03 -0700 |
commit | 789a4bbd28e4e5128a66a6e35117ef9392fed867 (patch) | |
tree | 6e0b49c779ea3de5b184f212ac9c6a1156df232a /mm/readahead.c | |
parent | d16dbb330b8517c1df7e03c120cac572d726a5b6 (diff) |
USB: keyspan: fix NULL-pointer dereferences and memory leaks
commit f79b2d0fe81eecb412dc48e87a119afc690da8e9 upstream.
Fix NULL-pointer dereference at release by moving port data allocation
and deallocation to port_probe and port_remove.
Fix NULL-pointer dereference at disconnect by stopping port urbs at
port_remove.
Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer accessible at
disconnect or release.
Note that this patch also fixes port and interface-data memory leaks in
the error path of attach should port initialisation fail for any port.
Compile-only tested.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/readahead.c')
0 files changed, 0 insertions, 0 deletions