zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: repost: memory leak, maybe.
@ 2004-07-11 22:44 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2004-07-11 22:44 UTC (permalink / raw)
  To: Zsh hackers list

I've had this patch lying around for ages.  It was supposed to fix
a memory leak, but we never proved this was the problem.  It's been
running on my home desktop without a problem, so I may run it up to
the top of the flagpole.

Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.50
diff -u -r1.50 compresult.c
--- Src/Zle/compresult.c	2 Jun 2004 22:15:01 -0000	1.50
+++ Src/Zle/compresult.c	11 Jul 2004 22:35:35 -0000
@@ -1768,6 +1768,9 @@
 		g->width += (max - (g->width * g->cols - CM_SPACE)) / g->cols;
 	}
     }
+    else
+	for (g = amatches; g; g = g->next)
+	    zfree(g->widths, 0);
     listdat.valid = 1;
     listdat.hidden = hidden;
     listdat.nlist = nlist;

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-11 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-11 22:44 PATCH: repost: memory leak, maybe Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).