diff options
| author | Wen Yang <[email protected]> | 2020-03-18 15:31:56 +0000 |
|---|---|---|
| committer | Miquel Raynal <[email protected]> | 2020-03-24 22:01:36 +0000 |
| commit | 49c64df880570034308e4a9a49c4bc95cf8cdb33 (patch) | |
| tree | 1b150ed2a7b24f7a6c1d33c7fdfdd62150db85af /drivers/mtd/lpddr/lpddr_cmds.c | |
| parent | mtd: lpddr: Fix a double free in probe() (diff) | |
| download | kernel-49c64df880570034308e4a9a49c4bc95cf8cdb33.tar.gz kernel-49c64df880570034308e4a9a49c4bc95cf8cdb33.zip | |
mtd: phram: fix a double free issue in error path
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 <[email protected]>
Cc: Joern Engel <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Vignesh Raghavendra <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
0 files changed, 0 insertions, 0 deletions
