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

Commit 919f538e authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

lmkd: use after free

Remove a use-after free reference of procp->pid, using the already
captured pid variable.

Test: lmkd_unit_tests
Bug: 33808187
Change-Id: I3f5f8dd9acab2e28c81465d6195b73ae47e0a3c4
parent 94e93055
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -615,11 +615,11 @@ static int kill_one_process(struct proc* procp, int min_score_adj, bool is_criti
    pid_remove(pid);

    if (r) {
        ALOGE("kill(%d): errno=%d", procp->pid, errno);
        ALOGE("kill(%d): errno=%d", pid, errno);
        return -1;
    } else {
        return tasksize;
    }

    return tasksize;
}

/*