mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
52951: make sure to close memstream for 'print -v'
This commit is contained in:
parent
9a79a60c90
commit
a3b56d4f03
2 changed files with 6 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2024-06-13 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
|
* 52951: Src/builtin.c: make sure to close memstream for 'print -v'
|
||||||
|
|
||||||
2024-06-08 Mikael Magnusson <mikachu@gmail.com>
|
2024-06-08 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
* 52946: Completion/compdump, Completion/compinit: Revert 52768
|
* 52946: Completion/compdump, Completion/compinit: Revert 52768
|
||||||
|
|
|
@ -5455,9 +5455,8 @@ bin_print(char *name, char **args, Options ops, int func)
|
||||||
}
|
}
|
||||||
zwarnnam(name, "%s: invalid directive", start);
|
zwarnnam(name, "%s: invalid directive", start);
|
||||||
if (*c) c[1] = save;
|
if (*c) c[1] = save;
|
||||||
/* Why do we care about a clean close here? */
|
if (fout != stdout)
|
||||||
if (!CLOSE_CLEANLY(fout))
|
fclose(fout);
|
||||||
zwarnnam(name, "write error: %e", errno);
|
|
||||||
#ifdef HAVE_OPEN_MEMSTREAM
|
#ifdef HAVE_OPEN_MEMSTREAM
|
||||||
if (buf)
|
if (buf)
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
Loading…
Reference in a new issue