]> git.baikalelectronics.ru Git - kernel.git/commit
USB: option: fix interface-data memory leak in error path
authorJohan Hovold <jhovold@gmail.com>
Thu, 25 Oct 2012 13:42:40 +0000 (15:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Oct 2012 16:39:37 +0000 (09:39 -0700)
commit62841ae9e938ae6700b001bccefa69bf7c10413e
tree024fff0604ac13320f4d5db1955d406d73448e26
parentd5d2494c3ce201b3c3771d4bdea8b630d26a26e3
USB: option: fix interface-data memory leak in error path

Move interface data allocation to attach so that it is deallocated
should usb-serial probe fail.

Note that the usb device id is stored at probe so that it can be used
in attach to determine send-setup blacklisting.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/option.c