projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a430ab2
)
regmap: debugfs: Don't leak dummy names
author
Mark Brown
<broonie@kernel.org>
Mon, 5 Mar 2018 20:26:51 +0000
(20:26 +0000)
committer
Mark Brown
<broonie@kernel.org>
Mon, 5 Mar 2018 20:26:51 +0000
(20:26 +0000)
When allocating dummy names we need to store a pointer to the string we
allocate so that we don't leak it on free.
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-debugfs.c
patch
|
blob
|
history
diff --git
a/drivers/base/regmap/regmap-debugfs.c
b/drivers/base/regmap/regmap-debugfs.c
index e3e7b91cc42186719ce29881e639edabf4aaeb37..dd3a16894e3c2939beec7890e6761390fc2ab307 100644
(file)
--- a/
drivers/base/regmap/regmap-debugfs.c
+++ b/
drivers/base/regmap/regmap-debugfs.c
@@
-575,7
+575,9
@@
void regmap_debugfs_init(struct regmap *map, const char *name)
}
if (!strcmp(name, "dummy")) {
- name = kasprintf(GFP_KERNEL, "dummy%d", dummy_index);
+ map->debugfs_name = kasprintf(GFP_KERNEL, "dummy%d",
+ dummy_index);
+ name = map->debugfs_name;
dummy_index++;
}