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
This commit is contained in:
Mark Salyzyn 2018-02-04 15:27:23 -08:00
parent abe25b1fca
commit 1d5fdf356d
1 changed files with 3 additions and 3 deletions

6
lmkd.c
View File

@ -615,11 +615,11 @@ static int kill_one_process(struct proc* procp, int min_score_adj, bool is_criti
pid_remove(pid); pid_remove(pid);
if (r) { if (r) {
ALOGE("kill(%d): errno=%d", procp->pid, errno); ALOGE("kill(%d): errno=%d", pid, errno);
return -1; return -1;
} else {
return tasksize;
} }
return tasksize;
} }
/* /*