From: Denis Vlasenko Date: Sat, 2 Feb 2008 18:54:58 +0000 (-0000) Subject: fsck: don't kill pid -1! (Roy Marples ) X-Git-Tag: 1_10_0~230 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=30eb3191030f2ceb7b596a2666abc8e455de220c;p=oweals%2Fbusybox.git fsck: don't kill pid -1! (Roy Marples ) --- diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c index 8dd9785ee..012285103 100644 --- a/e2fsprogs/fsck.c +++ b/e2fsprogs/fsck.c @@ -663,6 +663,12 @@ static void execute(const char *type, const char *device, const char *mntpt, for (i = num_args+1; i < argc; i++) free(argv[i]); + /* No pid, so don't record an instance */ + if (pid < 0) { + free(inst); + return; + } + inst->pid = pid; inst->prog = argv[0]; inst->type = xstrdup(type);