diff options
| author | Dan Carpenter <[email protected]> | 2021-01-05 11:42:29 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2021-01-05 14:34:41 +0000 |
| commit | f6bcb4c7f366905b66ce8ffca7190118244bb642 (patch) | |
| tree | 5a084819bfc49a1fc55b52dd41b02e6fc4ec7304 /net/switchdev/switchdev.c | |
| parent | regmap: debugfs: Fix a memory leak when calling regmap_attach_dev (diff) | |
| download | kernel-f6bcb4c7f366905b66ce8ffca7190118244bb642.tar.gz kernel-f6bcb4c7f366905b66ce8ffca7190118244bb642.zip | |
regmap: debugfs: Fix a reversed if statement in regmap_debugfs_init()
This code will leak "map->debugfs_name" because the if statement is
reversed so it only frees NULL pointers instead of non-NULL. In
fact the if statement is not required and should just be removed
because kfree() accepts NULL pointers.
Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/X/RQpfAwRdLg0GqQ@mwanda
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
