drivers/usb/class/cdc-acm.c: clear dangling pointer
authorJulia Lawall <julia@diku.dk>
Fri, 23 Dec 2011 13:02:55 +0000 (14:02 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 4 Jan 2012 23:52:43 +0000 (15:52 -0800)
commite7c8e8605d0bafc705ff27f9da98a1668427cc0f
tree28611cae53fdf460b502e4113522181e3ce3f4ce
parent5632c827cbd3617613530ba0e99344192d0a31ca
drivers/usb/class/cdc-acm.c: clear dangling pointer

On some failures, the country_code field of an acm structure is freed
without freeing the acm structure itself.  Elsewhere, operations including
memcpy and kfree are performed on the country_code field.  The patch sets
the country_code field to NULL when it is freed, and likewise sets the
country_code_size field to 0.

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/cdc-acm.c