Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 46589e9c authored by Mark Brown's avatar Mark Brown
Browse files

regmap: debugfs: Don't leak dummy names



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: default avatarMark Brown <broonie@kernel.org>
parent a430ab20
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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++;
	}