Skip to content

Memory leaks and memory used after free fixes

Andrei Istodorescu linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bap: Remove memory leaks and buffer usage after free.profiles/audio/bap.c+39 -272 replies
2/2shared/bap: Set stream lpac to NULL after removing the stream.src/shared/bap.c+3 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH BlueZ 0/2] Memory leaks and memory used after free fixes

This patch fixes memory leaks and usage of unallocated memory.

The endpoint is initialized after allocation, so that it will not contain random pointers.
Rework parse_base and parse_array. Add missing unregister in bap_exit.
Set the lpac in the stream to NULL as it is freed in another place and will result in a dangling pointer inside the stream.

Andrei Istodorescu (2):
bap: Remove memory leaks and buffer usage after free. shared/bap: Set stream lpac to NULL after removing the stream.

 profiles/audio/bap.c | 66 ++++++++++++++++++++++++++------------------
 src/shared/bap.c     |  4 ++-
 2 files changed, 42 insertions(+), 28 deletions(-)

base-commit: df658c6c4ab5bd5ec4a8a3f8faa36e0d0a5f906a --
2.39.2