summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2021-01-04 09:41:37 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 10:26:24 +0100
commit7cb52169ada4e404bd6a06e1e76439bd54ce6667 (patch)
tree1a5596cb802f8e2bbd1e27b2027c42282be2fcc6 /fs/f2fs
parent35a5d96a4c22a109962e369bf6c1a0f1522f60fd (diff)
downloadlinux-stable-7cb52169ada4e404bd6a06e1e76439bd54ce6667.tar.gz
linux-stable-7cb52169ada4e404bd6a06e1e76439bd54ce6667.tar.bz2
linux-stable-7cb52169ada4e404bd6a06e1e76439bd54ce6667.zip
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: 1fca1f6abb38 ("mtd: afs: simplify partition parsing") Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210104041137.113075-5-manivannan.sadhasivam@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/f2fs')
0 files changed, 0 insertions, 0 deletions