Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: memory leaks report



Felix Rosencrantz wrote:
> Test B02typeset:
> 28 bytes in 4 blocks are definitely lost in loss record 1 of 11
>    at  malloc (vg_replace_malloc.c:153)
>    by  zalloc (mem.c:490)
>    by  ztrdup (string.c:52)
>    by  bin_typeset (builtin.c:2264)

Think I've finally found this one.

Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.77
diff -u -r1.77 params.c
--- Src/params.c	8 Mar 2004 11:01:19 -0000	1.77
+++ Src/params.c	18 Mar 2004 11:23:37 -0000
@@ -2673,6 +2673,7 @@
     zfree(pm->u.data, sizeof(struct tieddata));
     /* paranoia -- shouldn't need these, but in case we reuse the struct... */
     pm->u.data = NULL;
+    zsfree(pm->ename);
     pm->flags &= ~PM_TIED;
 }
 

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author