android_kernel_motorola_sm6375/drivers/mtd
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Manivannan Sadhasivam 7cb52169ad mtd: parsers: afs: Fix freeing the part name memory in failure
[ Upstream commit 7b844cf445f0a7daa68be0ce71eb2c88d68b0c5d ]

In the case of failure while parsing the partitions, the iterator should
be pre decremented by one before starting to free the memory allocated
by kstrdup(). Because in the failure case, kstrdup() will not succeed
and thus no memory will be allocated for the current iteration.

Fixes: 1fca1f6abb ("mtd: afs: simplify partition parsing")
Signed-off-by: Manivannan Sadhasivam <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Cc: Linus Walleij <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
2021-03-04 10:26:24 +01:00
..
chips mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup() 2020-10-01 13:17:16 +02:00
devices
hyperbus
lpddr mtd: lpddr: fix excessive stack usage with clang 2020-10-29 09:57:46 +01:00
maps
nand Revert "mtd: spinand: Fix OOB read" 2021-01-09 13:44:54 +01:00
parsers mtd: parsers: afs: Fix freeing the part name memory in failure 2021-03-04 10:26:24 +01:00
spi-nor mtd: spi-nor: Don't copy self-pointing struct around 2020-11-10 12:37:28 +01:00
tests
ubi ubi: check kthread_should_stop() after the setting of task state 2020-11-05 11:43:33 +01:00
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c mtd: properly check all write ioctls for permissions 2020-08-11 15:33:35 +02:00
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c mtd: mtdoops: Don't write panic data twice 2020-10-29 09:57:47 +01:00
mtdpart.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c