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

Skip to content
Commit 80a22163 authored by George Burgess IV's avatar George Burgess IV
Browse files

effects: fix a theoretical memory leak

`realloc` doesn't deallocate `param` if it fails. Since the loop ends in
a `free`, we just need to avoid overwriting `param` until after the
check.

Caught by the static analyzer:

frameworks/av/services/audioflinger/Effects.cpp:1868:9: warning:
Potential leak of memory pointed to by 'param'
[clang-analyzer-unix.Malloc]

Bug: None
Test: TreeHugger

Change-Id: I58fe4319927b3ea99989e1fb1dc2dabe89c72ef8
parent 3eef87ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment