Do you have this change? commit 28544391f5b478d215131c7b1d63590f7338e692 Author: Nicholas Marriott <nicholas.marri...@gmail.com> Date: Thu Feb 14 12:20:17 2013 +0000
Do not leak formats in status_replace. diff --git a/status.c b/status.c index 13ea9a5..636f627 100644 --- a/status.c +++ b/status.c @@ -503,7 +503,7 @@ status_replace(struct client *c, struct session *s, struct winlink *wl, struct window_pane *wp, const char *fmt, time_t t, int jobsflag) { static char out[BUFSIZ]; - char in[BUFSIZ], ch, *iptr, *optr; + char in[BUFSIZ], ch, *iptr, *optr, *expanded; size_t len; struct format_tree *ft; @@ -542,7 +542,9 @@ status_replace(struct client *c, struct session *s, struct winlink *wl, format_session(ft, s); format_winlink(ft, s, wl); format_window_pane(ft, wp); - return (format_expand(ft, out)); + expanded = format_expand(ft, out); + format_free(ft); + return (expanded); } /* Figure out job name and get its result, starting it off if necessary. */ On Sat, Feb 16, 2013 at 03:03:18PM +0100, Romain Francoise wrote: > While testing the reflow code I noticed that resizing the screen a lot > seems to leak some memory, and Valgrind agrees. In fact, memory gets > leaked even if I compile out the reflow code, so there are probably some > old bugs in there. > > I'm trying to understand what we're doing wrong but in the meantime, here > are two fixlets for bugs found by Valgrind: > - the config loader leaks 1 byte for every blank line in the file > - the emacs copy table has the same key twice, which makes the tree > initialization routine leak a mode_key_binding object > > diff --git a/cfg.c b/cfg.c > index 5e3e47e..c62f60c 100644 > --- a/cfg.c > +++ b/cfg.c > @@ -131,8 +131,10 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct > causelist *causes) > buf = copy; > while (isspace((u_char)*buf)) > buf++; > - if (*buf == '\0') > + if (*buf == '\0') { > + free(copy); > continue; > + } > > if (cmd_string_parse(buf, &cmdlist, &cause) != 0) { > free(copy); > diff --git a/mode-key.c b/mode-key.c > index 7dea26d..86367ad 100644 > --- a/mode-key.c > +++ b/mode-key.c > @@ -413,7 +413,6 @@ const struct mode_key_entry mode_key_emacs_copy[] = { > { '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE }, > { '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION }, > { '\033' /* Escape */, 0, MODEKEYCOPY_CANCEL }, > - { 'N', 0, MODEKEYCOPY_SEARCHREVERSE }, > { 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD }, > { 'f', 0, MODEKEYCOPY_JUMP }, > { 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORDEND }, ------------------------------------------------------------------------------ The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials, tech docs, whitepapers, evaluation guides, and opinion stories. Check out the most recent posts - join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users