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

Commit da891a1e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a memory leak"

parents 2bf84ab0 31225688
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -399,11 +399,12 @@ size_t AudioPolicyEffects::growParamSize(char **param,
        while (pos + size > *totSize) {
            *totSize += ((*totSize + 7) / 8) * 4;
        }
        *param = (char *)realloc(*param, *totSize);
        if (*param == NULL) {
        char *newParam = (char *)realloc(*param, *totSize);
        if (newParam == NULL) {
            ALOGE("%s realloc error for size %zu", __func__, *totSize);
            return 0;
        }
        *param = newParam;
    }
    *curSize = pos + size;
    return pos;