]> git.baikalelectronics.ru Git - kernel.git/commit
staging, vt6656/wpactl.c: Fix mem leak in wpa_ioctl()
authorJesper Juhl <jj@chaosbits.net>
Mon, 16 Jan 2012 20:28:37 +0000 (21:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 17:20:06 +0000 (09:20 -0800)
commit54a96c056ad1aca98bb78b869e022b7958372887
treee78e6e57ecdcd5b3b99773dada72bb0e79d0ab74
parent8f0cb72f6922eced447f9e0c4dc9b7064114f77a
staging, vt6656/wpactl.c: Fix mem leak in wpa_ioctl()

If we hit the default case in the switch statement in wpa_ioctl()
we'll leak the memory allocated to 'param' when the variable goes out
of scope without having been assigned to anything.

This patch fixes the leak by kfree()'ing the memory before we return
from the function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/wpactl.c