]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Net, libertas: Resolve memory leak in if_spi_host_to_card()
authorJesper Juhl <jj@chaosbits.net>
Sun, 13 Nov 2011 21:14:32 +0000 (22:14 +0100)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:19:15 +0000 (11:19 -0800)
commit2b3f63b24dfe0703852ea6c29ebe79e4100e9dbc
tree70bf7c8d5f257e387e0d6b12887d084d975474cf
parent70ccf05da9d4de7dd4d69ae209065d0d52c01dd7
Net, libertas: Resolve memory leak in if_spi_host_to_card()

commit fe09b32a4361bea44169b2063e8c867cabb6a8ba upstream.

If we hit the default case in the switch in if_spi_host_to_card() we'll leak
the memory we allocated for 'packet'. This patch resolves the leak by freeing
the allocated memory in that case.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/libertas/if_spi.c