commit | 40297e7f897281aa7bd61bf1323837a11a10479f | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Fri Jun 24 15:24:03 2016 +0300 |
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | Mon Jul 11 08:40:18 2016 +0200 |
tree | ac2e9dbb110c308f8d0ee52419a9b1b02ad47758 | |
parent | ab9d6a783544bbf8834277f8409048ddc35712ed [diff] |
mtd: nand: sunxi: prevent a small memory leak I moved the sanity check on ecc->size before the allocation so that we don't leak memory on error. Fixes: 05af074a4b73 ('mtd: nand: sunxi: check ecc->size values') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>