diff options
author | Wen Yang <[email protected]> | 2020-03-18 23:31:56 +0800 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2020-03-24 23:01:36 +0100 |
commit | 49c64df880570034308e4a9a49c4bc95cf8cdb33 (patch) | |
tree | 1b150ed2a7b24f7a6c1d33c7fdfdd62150db85af /drivers/mtd/lpddr/lpddr_cmds.c | |
parent | 4da0ea71ea934af18db4c63396ba2af1a679ef02 (diff) |
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