[2721] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[PATCH] Don't leak messages in owl_function_makemsg

daemon@ATHENA.MIT.EDU (David Benjamin)
Sat Oct 23 15:37:48 2010

From: David Benjamin <davidben@MIT.EDU>
To: barnowl-dev@mit.edu
Date: Sat, 23 Oct 2010 15:37:28 -0400

Just give the msgwin the memory we allocated instead of copying and
deleting things.
---
 functions.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/functions.c b/functions.c
index 37a8772..3e5b170 100644
--- a/functions.c
+++ b/functions.c
@@ -3406,7 +3406,7 @@ void owl_function_makemsg(const char *fmt, ...)
   va_end(ap);
 
   owl_function_debugmsg("makemsg: %s", str);
-  owl_msgwin_set_text(&g.msgwin, str);
+  owl_msgwin_set_text_nocopy(&g.msgwin, str);
 }
 
 /* get locations for everyone in .anyone.  If 'notify' is '1' then
-- 
1.7.3.1.g716de


home help back first fref pref prev next nref lref last post