staging: rtl8712: fix potential leaks in r8712_set_key()
authorChristian Engelmayer <cengelma@gmx.at>
Wed, 7 May 2014 19:40:41 +0000 (21:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 16:57:14 +0000 (01:57 +0900)
Fix potential leaks in the error paths of r8712_set_key(). In case the
algorithm specific checks fail, the function returns without enqueuing
or freeing the already allocated command and parameter structs. Use a
centralized exit path and make sure that all memory is freed correctly.
Detected by Coverity - CID 144370, 144371.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found