Skip to content

ASoC: cs35l56: Fix some cleanup memory leaks

Richard Fitzgerald linux-sound lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Added patch to prevent the double-free of debugfs

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ASoC: cs35l56: Fix missing calls to wm_adsp2_remove()sound/soc/codecs/cs35l56.c+6 -10 replies
2/3ASoC: cs35l56: Prevent double-free of debugfssound/soc/codecs/cs35l56-shared.c+1 -00 replies
3/3ASoC: cs35l56: Cleanup if component_probe failssound/soc/codecs/cs35l56.c sound/soc/codecs/wm_adsp.c+19 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] ASoC: cs35l56: Fix some cleanup memory leaks

These are for-next.

They are not urgent because it only leaks memory if the driver failed to component_probe or is removed, which wouldn't happen in normal use.

This series fixes some memory leaks:
- The memory allocated by wm_adsp/cs_dsp was not freed.
- If component_probe() failed it didn't clean up.

The addition of this cleanup in patch #3 exposes an existing possible double-free of the debugfs, which is fixed in patch #2.

Changes in V2:
- Added patch to prevent the double-free of debugfs

Richard Fitzgerald (3):
ASoC: cs35l56: Fix missing calls to wm_adsp2_remove()
ASoC: cs35l56: Prevent double-free of debugfs
ASoC: cs35l56: Cleanup if component_probe fails

 sound/soc/codecs/cs35l56-shared.c |  1 +
 sound/soc/codecs/cs35l56.c        | 20 ++++++++++++++++++--
 sound/soc/codecs/wm_adsp.c        |  7 +++++++
 3 files changed, 26 insertions(+), 2 deletions(-)
Signature · 1 line
2.47.3