On Sun, Mar 04, 2012 at 07:34:33 +0000, Nicholas Marriott wrote:
> I want to be reducing the use of status_replace so I don't want to add
> it back to display-message.
> 
> It is a good idea to use format_* inside status_replace, but first it
> needs to be changed to support the length modifiers. Then it can replace
> most of status_replace1. I haven't done this yet because I haven't
> really decided what to do with jobs.

Alright.

Should status_replace get a deprecated attribute to help draw attention
to where it is used?

Attached is a patch which just frees up leaked memory then.

--Ben
From 240815ea175b421f16113d63ef2eb57549aa7475 Mon Sep 17 00:00:00 2001
From: Ben Boeckel <maths...@gmail.com>
Date: Sun, 4 Mar 2012 10:25:28 -0500
Subject: [PATCH 1/2] Free the format tree

---
 cmd-display-message.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cmd-display-message.c b/cmd-display-message.c
index 1b87e77..dd1a955 100644
--- a/cmd-display-message.c
+++ b/cmd-display-message.c
@@ -90,6 +90,7 @@ cmd_display_message_exec(struct cmd *self, struct cmd_ctx 
*ctx)
                ctx->print(ctx, "%s", msg);
        else
                status_message_set(c, "%s", msg);
+       format_free(ft);
        xfree(msg);
 
        return (0);
-- 
1.7.9.1

Attachment: pgpPMld0yGjtZ.pgp
Description: PGP signature

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to