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

Commit 5caaa557 authored by Inseob Kim's avatar Inseob Kim
Browse files

Don't kill subcontext if it's null

We don't initialize subcontext in microdroid. subcontext->pid() will
crash in such case.

Test: atest MicrodroidTests
Change-Id: Ifca65acededbf7f113d8bf16afbb8e2c1aa91b41
parent ff3fdf36
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -381,6 +381,9 @@ bool SubcontextChildReap(pid_t pid) {
}

void SubcontextTerminate() {
    if (!subcontext) {
        return;
    }
    subcontext_terminated_by_shutdown = true;
    kill(subcontext->pid(), SIGTERM);
}