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

Commit 1b33107f authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Don't double destruct audio_track_cblk_t"

parents cd330e7f d9d68dcb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ namespace android {
#define CBLK_RESTORED_ON        0x0040  // track has been restored after invalidation
#define CBLK_RESTORED_OFF       0x0040  // by AudioFlinger

// Important: do not add any virtual methods, including ~
struct audio_track_cblk_t
{

+4 −2
Original line number Diff line number Diff line
@@ -3291,9 +3291,10 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase(
AudioFlinger::ThreadBase::TrackBase::~TrackBase()
{
    if (mCblk != NULL) {
        mCblk->~audio_track_cblk_t();   // destroy our shared-structure.
        if (mClient == NULL) {
        if (mClient == 0) {
            delete mCblk;
        } else {
            mCblk->~audio_track_cblk_t();   // destroy our shared-structure.
        }
    }
    mCblkMemory.clear();            // and free the shared memory
@@ -6915,6 +6916,7 @@ void AudioFlinger::EffectHandle::disconnect(bool unpiniflast)
    mEffect.clear();
    if (mClient != 0) {
        if (mCblk != NULL) {
            // unlike ~TrackBase(), mCblk is never a local new, so don't delete
            mCblk->~effect_param_cblk_t();   // destroy our shared-structure.
        }
        mCblkMemory.clear();            // and free the shared memory