OSDN Git Service

aaudio: prevent memory leak from double configure
authorPhil Burk <philburk@google.com>
Mon, 14 Aug 2017 19:38:58 +0000 (12:38 -0700)
committerPhil Burk <philburk@google.com>
Wed, 16 Aug 2017 16:57:49 +0000 (09:57 -0700)
commit99306c80f061e4c11f05c21a19bfab6eac01c529
tree4c9bceacfa5110d378351fe9cfd732b805808118
parentf4eb56ca4eb80124b344a8c6f56c4d1495014c31
aaudio: prevent memory leak from double configure

Prevent AudioEndpoint from being configure()d twice.
Check return value of AudioEndpoint.configure().
Prevent AudioStreamInternal from being open()ed twice.

Bug: 64522125
Test: adb shell dumpsys media.audio_flinger --unreachable
Change-Id: I3ae07af5610fd1f9e539f884923f781eefcd645f
media/libaaudio/src/client/AudioEndpoint.cpp
media/libaaudio/src/client/AudioStreamInternal.cpp