diff options
| author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-07-31 22:15:58 +0900 |
|---|---|---|
| committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-07-31 22:15:58 +0900 |
| commit | baedd62f0d601bf03d99b2366a8ace42268e88ed (patch) | |
| tree | 82add95fcfcf764c535b2b3ee126eb012ba5b648 /Src/init.c | |
| parent | 43225: Recalculate ZLE timeout. (diff) | |
| download | zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.tar zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.tar.gz zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.tar.bz2 zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.tar.lz zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.tar.xz zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.tar.zst zsh-baedd62f0d601bf03d99b2366a8ace42268e88ed.zip | |
43219 (except term{cap,info}.c): fix several memory leaks
Diffstat (limited to 'Src/init.c')
| -rw-r--r-- | Src/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c index c5372665a..e9e6be9b4 100644 --- a/Src/init.c +++ b/Src/init.c @@ -459,7 +459,8 @@ parseopts(char *nam, char ***argvp, char *new_opts, char **cmdp, /* -c command */ *cmdp = *argv; new_opts[INTERACTIVE] &= 1; - scriptname = scriptfilename = ztrdup("zsh"); + if (toplevel) + scriptname = scriptfilename = ztrdup("zsh"); } else if (**argv == 'o') { if (!*++*argv) argv++; |
