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

Commit 52907665 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio flinger: fix audio patch release" into nyc-dev

parents 76016ccf 0666cc5b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -168,6 +168,12 @@ status_t AudioFlinger::PatchPanel::createAudioPatch(const struct audio_patch *pa
                ALOGV("createAudioPatch() removing patch handle %d", *handle);
                halHandle = mPatches[index]->mHalHandle;
                Patch *removedPatch = mPatches[index];
                if ((removedPatch->mRecordPatchHandle
                        != AUDIO_PATCH_HANDLE_NONE) ||
                        (removedPatch->mPlaybackPatchHandle !=
                                AUDIO_PATCH_HANDLE_NONE)) {
                    clearPatchConnections(removedPatch);
                }
                mPatches.removeAt(index);
                delete removedPatch;
                break;