]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()
authorChristian Engelmayer <cengelma@gmx.at>
Wed, 7 May 2014 19:36:48 +0000 (21:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 16:57:14 +0000 (01:57 +0900)
commit55d4f6cc4c922123cf8eb7b428191a0c33f08704
tree7238f444787986920136c1a5364c7db82617d179
parent540958e2f5a87b81aa5f55ce40b3e2869754f97d
staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()

Fix a potential leak in the error path of r871x_wx_set_enc_ext(). In case the
requested algorithm is not supported by the driver, the function returns
without freeing the already allocated 'param' struct. Move the input
verification to the beginning of the function so that the direct return is
safe. Detected by Coverity - CID 144373.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c