summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/processor.h
diff options
context:
space:
mode:
authorWen Yang <wenyang@linux.alibaba.com>2020-03-18 23:31:56 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-24 07:57:26 +0200
commit128e99c8c35fb173b473ae865ea4f707e41154d9 (patch)
tree92a4c43d1e78d70325278ed66e867e428f96fe23 /arch/x86/include/asm/processor.h
parentea5a52ce59b220947faff6a9fa0b6aeabe863804 (diff)
mtd: phram: fix a double free issue in error path
commit 49c64df880570034308e4a9a49c4bc95cf8cdb33 upstream. The variable 'name' is released multiple times in the error path, which may cause double free issues. This problem is avoided by adding a goto label to release the memory uniformly. And this change also makes the code a bit more cleaner. Fixes: 4f678a58d335 ("mtd: fix memory leaks in phram_setup") Signed-off-by: Wen Yang <wenyang@linux.alibaba.com> Cc: Joern Engel <joern@lazybastard.org> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Cc: Richard Weinberger <richard@nod.at> Cc: Vignesh Raghavendra <vigneshr@ti.com> Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200318153156.25612-1-wenyang@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/include/asm/processor.h')
0 files changed, 0 insertions, 0 deletions