Mercurial > pidgin
diff src/protocols/msn/msg.c @ 6011:b8abf266dd3b
[gaim-migrate @ 6459]
Fixed a good sized memory leak in the MSN prpl. Thanks for reporting it
Dreoth!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 04 Jul 2003 05:38:55 +0000 |
parents | 4f72b611f0ee |
children | f7ddc1f6227e |
line wrap: on
line diff
--- a/src/protocols/msn/msg.c Fri Jul 04 04:09:13 2003 +0000 +++ b/src/protocols/msn/msg.c Fri Jul 04 05:38:55 2003 +0000 @@ -72,7 +72,7 @@ msn_message_new_from_str(MsnSession *session, const char *str) { MsnMessage *msg; - char *tmp, *field1, *field2, *c; + char *tmp_base, *tmp, *field1, *field2, *c; g_return_val_if_fail(str != NULL, NULL); g_return_val_if_fail(!g_ascii_strncasecmp(str, "MSG", 3), NULL); @@ -84,7 +84,7 @@ msn_message_set_content_type(msg, NULL); msn_message_set_charset(msg, NULL); - tmp = g_strdup(str); + tmp_base = tmp = g_strdup(str); GET_NEXT(tmp); /* Skip MSG */ field1 = tmp; @@ -166,6 +166,8 @@ /* Now we *should* be at the body. */ msn_message_set_body(msg, tmp); + g_free(tmp_base); + /* Done! */ return msg;