← Commit list

d4293c77f

Denis Vlasenko
Denis Vlasenko
2007-07-18
FAILED Duration: 13s

Subject

ash: fix SEGV in forkchild (jp can be NULL). here documents were affected.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+2 -1
@@ -4424,7 +4424,8 @@ forkchild(struct job *jp, union node *n, int mode)
#if JOBS
/* For "jobs | cat" to work like in bash, we must retain list of jobs
* in child, but we do need to remove ourself */
- freejob(jp);
+ if (jp)
+ freejob(jp);
#else
for (jp = curjob; jp; jp = jp->prev_job)
freejob(jp);