• fix memory leaks found by coverity
from netbsd via oksh we had the NULL pointer deref already fixed • avoid a bogus not-setting the return value of edit.c:x_file_glob() introduced by the above change in oksh • escape ? as well (but not ] because that’s wrong) reminded by cbiere@netbsd via oksh • Unsetting a non-existent variable is not an error. See http://www.opengroup.org/onlinepubs/009695399/utilities/unset.html report from Arkadiusz Miskiewicz; fixed based on http://cvs.pld-linux.org diff via oksh but modified slightly • Be more smart waiting for input for non-interactive scripts. Fix based on a diff from debian: see their bug#296446 (via oksh) modified slightly this also fixes cnuke@’s “mksh busy loop” problem, for which I never received a bug report, but the Debian bug page contains a set of two scripts to reproduce this before (and no longer after) this commit • some KNF • bump version
This commit is contained in:
5
eval.c
5
eval.c
@ -1,8 +1,8 @@
|
||||
/* $OpenBSD: eval.c,v 1.30 2006/04/10 14:38:59 jaredy Exp $ */
|
||||
/* $OpenBSD: eval.c,v 1.33 2007/08/02 11:05:54 fgsch Exp $ */
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.34 2007/07/31 10:42:15 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.35 2007/09/09 18:06:39 tg Exp $");
|
||||
|
||||
#ifdef MKSH_SMALL
|
||||
#define MKSH_NOPWNAM
|
||||
@ -903,6 +903,7 @@ comsub(Expand *xp, const char *cp)
|
||||
s->start = s->str = cp;
|
||||
sold = source;
|
||||
t = compile(s);
|
||||
afree(s, ATEMP);
|
||||
source = sold;
|
||||
|
||||
if (t == NULL)
|
||||
|
Reference in New Issue
Block a user