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

Commit 0907d87d authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "Fix AudioRecord cleanup if construction fails" into mnc-dev

parents efabeff1 4c6afaf1
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;