aaudio: deleted FifoBuffers to fix memory leak
Bug: 64522125
Test: adb shell dumpsys media.audio_flinger --unreachable
Change-Id: I6045f951b4d793f31cac73e793258e168f74f3f2
diff --git a/media/libaaudio/src/client/AudioEndpoint.cpp b/media/libaaudio/src/client/AudioEndpoint.cpp
index 6ae5379..3ee450a 100644
--- a/media/libaaudio/src/client/AudioEndpoint.cpp
+++ b/media/libaaudio/src/client/AudioEndpoint.cpp
@@ -32,14 +32,17 @@
#define RIDICULOUSLY_LARGE_FRAME_SIZE 4096
AudioEndpoint::AudioEndpoint()
- : mFreeRunning(false)
+ : mUpCommandQueue(nullptr)
+ , mDataQueue(nullptr)
+ , mFreeRunning(false)
, mDataReadCounter(0)
, mDataWriteCounter(0)
{
}
-AudioEndpoint::~AudioEndpoint()
-{
+AudioEndpoint::~AudioEndpoint() {
+ delete mDataQueue;
+ delete mUpCommandQueue;
}
static aaudio_result_t AudioEndpoint_validateQueueDescriptor(const char *type,