diff options
| author | 2009-11-09 04:45:39 -0800 | |
|---|---|---|
| committer | 2009-11-09 04:45:39 -0800 | |
| commit | 7b57085a7353f368e8797ca5e4684a05fb55f26f (patch) | |
| tree | 8fb118fcec8ae2e9328f62720bf3794711b7b9b7 /libs/audioflinger/AudioFlinger.cpp | |
| parent | 5dc4fb08493aa9cf34dc81283c850b9b6a998ce8 (diff) | |
AudioFlinger: delete Track object when createTrack() fails due to lack of tracks in AudioMixer.
This problem was encountered as a side effect of issue 2245298.
Diffstat (limited to 'libs/audioflinger/AudioFlinger.cpp')
| -rw-r--r-- | libs/audioflinger/AudioFlinger.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp index 230e833c9d..ebd470f412 100644 --- a/libs/audioflinger/AudioFlinger.cpp +++ b/libs/audioflinger/AudioFlinger.cpp @@ -1018,7 +1018,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra Mutex::Autolock _l(mLock); track = new Track(this, client, streamType, sampleRate, format, channelCount, frameCount, sharedBuffer); - if (track->getCblk() == NULL) { + if (track->getCblk() == NULL || track->name() < 0) { lStatus = NO_MEMORY; goto Exit; } |