Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: memory leak / file handle left open in bin_print
- X-seq: zsh-workers 25910
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: memory leak / file handle left open in bin_print
- Date: Sat, 18 Oct 2008 14:04:31 +0000
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.212
diff -u -r1.212 builtin.c
--- Src/builtin.c 14 Oct 2008 21:47:52 -0000 1.212
+++ Src/builtin.c 18 Oct 2008 14:00:57 -0000
@@ -3689,8 +3689,11 @@
if (OPT_ISSET(ops,'o') || OPT_ISSET(ops,'O')) {
int flags;
- if (fmt && !*args)
+ if (fmt && !*args) {
+ if (fout != stdout)
+ fclose(fout);
return 0;
+ }
flags = OPT_ISSET(ops,'i') ? SORTIT_IGNORING_CASE : 0;
if (OPT_ISSET(ops,'O'))
flags |= SORTIT_BACKWARDS;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author