]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mtd: nand: sunxi: Free allocated memory on errors
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 1 Aug 2025 10:39:15 +0000 (11:39 +0100)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sun, 3 Aug 2025 08:20:16 +0000 (10:20 +0200)
commit56372f834c717402882112ba888943421020b6d5
tree02755c990821560b500f8ab86bc38d4f57104005
parent4003ed1c1ecfc88092a1d3c65bf432ab7c2ea15f
mtd: nand: sunxi: Free allocated memory on errors

Add kfree calls on error paths for memory that was allocated. This will
prevent memory leaks.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/raw/sunxi_nand.c