Cleanup openRecord error handling
Bug: 10888816
Change-Id: I84897dd7d30b370640b54e928f230604b873cb68
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 5f36cab..cba9ad1 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4548,7 +4548,7 @@
lStatus = initCheck();
if (lStatus != NO_ERROR) {
- ALOGE("Audio driver not initialized.");
+ ALOGE("createRecordTrack_l() audio driver not initialized");
goto Exit;
}
@@ -4612,7 +4612,9 @@
format, channelMask, frameCount, sessionId);
if (track->getCblk() == 0) {
+ ALOGE("createRecordTrack_l() no control block");
lStatus = NO_MEMORY;
+ track.clear();
goto Exit;
}
mTracks.add(track);