diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-18 21:35:43 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-18 21:35:43 +0000 |
commit | d4293c77f1b7f62f04ebb4fcd87063d73808bb12 (patch) | |
tree | fd3bb5b059d72ca1fc935bad2040bcda37885300 /shell/ash.c | |
parent | de1c8b2e920996af143dfe75c370117c60579727 (diff) | |
download | busybox-w32-d4293c77f1b7f62f04ebb4fcd87063d73808bb12.tar.gz busybox-w32-d4293c77f1b7f62f04ebb4fcd87063d73808bb12.tar.bz2 busybox-w32-d4293c77f1b7f62f04ebb4fcd87063d73808bb12.zip |
ash: fix SEGV in forkchild (jp can be NULL). here documents were affected.
Diffstat (limited to '')
-rw-r--r-- | shell/ash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 06c4698f9..32c440274 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -4424,7 +4424,8 @@ forkchild(struct job *jp, union node *n, int mode) | |||
4424 | #if JOBS | 4424 | #if JOBS |
4425 | /* For "jobs | cat" to work like in bash, we must retain list of jobs | 4425 | /* For "jobs | cat" to work like in bash, we must retain list of jobs |
4426 | * in child, but we do need to remove ourself */ | 4426 | * in child, but we do need to remove ourself */ |
4427 | freejob(jp); | 4427 | if (jp) |
4428 | freejob(jp); | ||
4428 | #else | 4429 | #else |
4429 | for (jp = curjob; jp; jp = jp->prev_job) | 4430 | for (jp = curjob; jp; jp = jp->prev_job) |
4430 | freejob(jp); | 4431 | freejob(jp); |