[154] in bug-owl
memory leak
daemon@ATHENA.MIT.EDU (Jeremy Daniel)
Tue Mar 18 00:37:50 2003
To: bug-owl@MIT.EDU
From: Jeremy Daniel <jdaniel@MIT.EDU>
Date: 18 Mar 2003 00:37:48 -0500
Message-ID: <ske8yvdw7yr.fsf@multics.mit.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
I think there's a free missing from the second half of the if in here.
I moved the relevant one in the first half outside since the malloc is
also outside.
> cvs diff -u message.c
Index: message.c
===================================================================
RCS file: /mit/ktools/src/owl/repository/owl/message.c,v
retrieving revision 1.21
diff -u -r1.21 message.c
--- message.c 25 Feb 2003 17:56:22 -0000 1.21
+++ message.c 18 Mar 2003 05:28:39 -0000
@@ -471,12 +471,12 @@
if (owl_global_is_newlinestrip(&g)) {
tmp2=owl_util_stripnewlines(tmp);
owl_message_set_body(m, tmp2);
- owl_free(tmp);
owl_free(tmp2);
} else {
owl_message_set_body(m, tmp);
}
-
+ owl_free(tmp);
+
/* if zcrypt is enabled try to decrypt the message */
if (owl_global_is_zcrypt(&g) && !strcasecmp(n->z_opcode, "crypt")) {
char *out;
--
Jer
------------------------------------------------------------------
Tulgey Wood - tulgeywood@attbi.com Cell Phone: 617-429-8573 /
4 Farragut Ave (617-629-3983) jdaniel-phone@mit.edu
Somerville, MA 02144-1709 AIM: jdanielmit
Zephyr athena users over the web: http://webzephyr.mit.edu/