diff options
author | Eric Laurent <elaurent@google.com> | 2015-01-15 14:29:19 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-01-15 14:29:19 -0800 |
commit | 182c2f5e48f46c11dbcb5eecb46268dff4ad4797 (patch) | |
tree | b1a7e63012b5e2ee6b6975baae5c0726e4376397 /services/audiopolicy | |
parent | 5f3194c9efeadc200c89d9e2b00a19f1afeac55d (diff) | |
download | frameworks_av-182c2f5e48f46c11dbcb5eecb46268dff4ad4797.zip frameworks_av-182c2f5e48f46c11dbcb5eecb46268dff4ad4797.tar.gz frameworks_av-182c2f5e48f46c11dbcb5eecb46268dff4ad4797.tar.bz2 |
fix leak in audio policy effect config parser
Free temporary effect descriptors created in
loadAudioEffectConfig().
Bug 19021726.
Change-Id: Icd44216e25df3fe683a01763d7e8a7b84f367a1a
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyEffects.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audiopolicy/AudioPolicyEffects.cpp b/services/audiopolicy/AudioPolicyEffects.cpp index 4fbe042..e6ace20 100644 --- a/services/audiopolicy/AudioPolicyEffects.cpp +++ b/services/audiopolicy/AudioPolicyEffects.cpp @@ -658,6 +658,10 @@ status_t AudioPolicyEffects::loadAudioEffectConfig(const char *path) loadInputEffectConfigurations(root, effects); loadStreamEffectConfigurations(root, effects); + for (size_t i = 0; i < effects.size(); i++) { + delete effects[i]; + } + config_free(root); free(root); free(data); |