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

Commit a2c8dc48 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "effects: fix a theoretical memory leak" am: 7f4beda2 am: 139b5728

Change-Id: Idac6217b6be23b138dda448f470443de28326189
parents e23cbd26 139b5728
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1856,12 +1856,13 @@ status_t AudioFlinger::EffectHandle::command(uint32_t cmdCode,
            }

            // copy to local memory in case of client corruption b/32220769
            param = (effect_param_t *)realloc(param, size);
            if (param == NULL) {
            auto *newParam = (effect_param_t *)realloc(param, size);
            if (newParam == NULL) {
                ALOGW("command(): out of memory");
                status = NO_MEMORY;
                break;
            }
            param = newParam;
            memcpy(param, p, size);

            int reply = 0;