Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c6afaf1 authored by Andy Hung's avatar Andy Hung
Browse files

Fix AudioRecord cleanup if construction fails

Bug: 11671194
Change-Id: Id48350264f8b5ce53bf7ce2b308bf4ba21e59241
parent ca097142
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -1951,7 +1951,9 @@ AudioFlinger::RecordThread::RecordTrack::RecordTrack(
                          ((buffer == NULL) ? ALLOC_LOCAL : ALLOC_NONE),
                          ((buffer == NULL) ? ALLOC_LOCAL : ALLOC_NONE),
                  type),
                  type),
        mOverflow(false),
        mOverflow(false),
        mFramesToDrop(0)
        mFramesToDrop(0),
        mResamplerBufferProvider(NULL), // initialize in case of early constructor exit
        mRecordBufferConverter(NULL)
{
{
    if (mCblk == NULL) {
    if (mCblk == NULL) {
        return;
        return;