staging: vt6656: Fix possible leak in vnt_download_firmware()
authorChristian Engelmayer <cengelma@gmx.at>
Wed, 11 Feb 2015 19:33:15 +0000 (20:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 00:26:58 +0000 (16:26 -0800)
commitd34add05946ffda90ad5c4f0f71af2819748c660
tree6746a1d6e93457bb7ecdf32e5c2a62913abd3ae6
parent6498613d2cf23269a6a483a751f61655115de251
staging: vt6656: Fix possible leak in vnt_download_firmware()

When failing to allocate buffer memory, function vnt_download_firmware() goes
through the wrong exit path and fails to release the already requested
firmware. Thus use the correct cleanup. Detected by Coverity CID 1269128.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/firmware.c