it out prior to continuing down the recursive call chain.
Initial diff from Michael W. Bombardieri, later tweaked; ok tb@
-/* $OpenBSD: exec.c,v 1.68 2016/12/11 17:49:19 millert Exp $ */
+/* $OpenBSD: exec.c,v 1.69 2017/12/18 20:30:14 anton Exp $ */
/*
* execute command tree
volatile int rv = 0;
char *cp;
char **lastp;
- static struct op texec; /* Must be static (XXX but why?) */
+ struct op texec;
int type_flags;
int keepasn_ok;
int fcflags = FC_BI|FC_FUNC|FC_PATH;
}
/* to fork we set up a TEXEC node and call execute */
+ memset(&texec, 0, sizeof(texec));
texec.type = TEXEC;
texec.left = t; /* for tprint */
texec.str = tp->val.s;