mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 16:50:58 +01:00
35482: be consistent about how argzero is allocated
This commit is contained in:
parent
54c2c442ee
commit
19b37ef565
2 changed files with 7 additions and 2 deletions
|
|
@ -1117,8 +1117,9 @@ setupshin(char *runscript)
|
|||
exit(127);
|
||||
}
|
||||
scriptfilename = sfname;
|
||||
zsfree(argzero); /* ztrdup'd in parseargs */
|
||||
argzero = runscript;
|
||||
sfname = argzero; /* copy to avoid race condition */
|
||||
argzero = ztrdup(runscript);
|
||||
zsfree(sfname); /* argzero ztrdup'd in parseargs */
|
||||
}
|
||||
/*
|
||||
* We only initialise line numbering once there is a script to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue