Skip to content

Commit 8e375cc

Browse files
Boris BREZILLONcomputersforpeace
authored andcommitted
mtd: nand: sunxi: fix sunxi_nand_chips_cleanup()
The sunxi_nand_chips_cleanup() function is missing a call to list_del() which generates a double free error. Reported-by: Priit Laes <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Cc: <[email protected]> # 3.19+ Fixes: 1fef62c ("mtd: nand: add sunxi NAND flash controller support") Tested-by: Priit Laes <[email protected]> Signed-off-by: Brian Norris <[email protected]>
1 parent 03a0e8a commit 8e375cc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mtd/nand/sunxi_nand.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,7 @@ static void sunxi_nand_chips_cleanup(struct sunxi_nfc *nfc)
13811381
node);
13821382
nand_release(&chip->mtd);
13831383
sunxi_nand_ecc_cleanup(&chip->nand.ecc);
1384+
list_del(&chip->node);
13841385
}
13851386
}
13861387

0 commit comments

Comments
 (0)