commit | 80a22163606b1b3319743fb58387c67aafcbc2da | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Sun Jan 05 20:06:15 2020 -0800 |
committer | George Burgess IV <gbiv@google.com> | Sun Jan 05 20:09:50 2020 -0800 |
tree | baec51f9cdcae5eeb43618ca984a03ac51278c91 | |
parent | 3eef87ec4e6413fb49990de06fef2480fc23aeef [diff] |
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