]> git.baikalelectronics.ru Git - kernel.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)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 15 Nov 2011 15:02:57 +0000 (10:02 -0500)
commitaa4af50cb33fa9cdadd9392e12e71eff03108533
tree6669196f194348c76ca7fe0f2828555957476449
parentb2ebe6a17f598e848bc1af7029ec02f35ad5d2c8
Net, libertas: Resolve memory leak in if_spi_host_to_card()

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>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_spi.c