Mercurial > pidgin.yaz
changeset 44:e3e7351cf70d
[gaim-migrate @ 53]
Fixed two more memory leaks. Well, Partner, I guess my work here is done :)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Sat, 25 Mar 2000 21:40:34 +0000 |
parents | 30f572f1a358 |
children | 939455223459 |
files | ChangeLog src/gaimrc.c src/toc.c |
diffstat | 3 files changed, 28 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Mar 25 17:39:57 2000 +0000 +++ b/ChangeLog Sat Mar 25 21:40:34 2000 +0000 @@ -13,9 +13,8 @@ * Various GNOME Applet Enhancements (thanks AGAIN to Eric. Someone needs to stop this boy :-) ) * A lot of random, obscure bugs fixed - * About very many memory leaks fixed (yes, we're embarassed) - (Thanks to Peter Teichman, Larry Ewing, and Jeramey - Crawford) + * All of the major and I believe all of the minor memory leaks are now fixed + (Thanks to Peter Teichman, Larry Ewing, Jeramey Crawford, and me :) ) version 0.9.11: * <STRIKE>Strike Tag Support</STRIKE> :-)
--- a/src/gaimrc.c Sat Mar 25 17:39:57 2000 +0000 +++ b/src/gaimrc.c Sat Mar 25 21:40:34 2000 +0000 @@ -146,26 +146,32 @@ void filter_break(char *msg) { - char *c; - int mc; + char *c; + int mc; + int cc; + + c = g_malloc(strlen(msg)+1); + strcpy(c, msg); - c = g_strdup(msg); - mc = 0; - while (*c) - { - if (*c == '\\') { - c++; - msg[mc] = *c; - } - else { - msg[mc] = *c; - } - mc++; - c++; - } - msg[mc] = 0; + mc = 0; + cc = 0; + while (c[cc] != '\0') + { + if (c[cc] == '\\') { + cc++; + msg[mc] = c[cc]; + } + else { + msg[mc] = c[cc]; + } + mc++; + cc++; + } + msg[mc] = 0; + g_free(c); } + static void gaimrc_read_away(FILE *f) { struct parse *p;