Mercurial > pidgin
changeset 20494:82d8797e06f3
Plug memory leaks.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 08 Sep 2007 03:34:49 +0000 |
parents | 9e2ed6cd824b |
children | 7f5564ebde7f 89a82874d64e |
files | libpurple/protocols/msn/contact.c libpurple/protocols/msn/notification.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c Sat Sep 08 01:33:25 2007 +0000 +++ b/libpurple/protocols/msn/contact.c Sat Sep 08 03:34:49 2007 +0000 @@ -809,11 +809,13 @@ if ( !strncmp(errorcodestring, "ABDoesNotExist", 14) ) { g_free(errorcodestring); + xmlnode_free(node); return TRUE; } g_free(errorcodestring); } } + xmlnode_free(node); return FALSE; } @@ -821,6 +823,7 @@ response = xmlnode_get_child(body,"ABFindAllResponse"); if (response == NULL) { + xmlnode_free(node); return FALSE; } @@ -828,6 +831,7 @@ result = xmlnode_get_child(response,"ABFindAllResult"); if(result == NULL){ purple_debug_misc("MSNAB","receive no address book update\n"); + xmlnode_free(node); return TRUE; } purple_debug_info("MSN SOAP","result{%p},name:%s\n",result,result->name);
--- a/libpurple/protocols/msn/notification.c Sat Sep 08 01:33:25 2007 +0000 +++ b/libpurple/protocols/msn/notification.c Sat Sep 08 03:34:49 2007 +0000 @@ -490,8 +490,8 @@ body_enc ? body_enc : "", post ? post : ""); g_free(pre); g_free(post); - g_free(body_enc); } + g_free(body_enc); serv_got_im(gc, passport, body_final, 0, time(NULL)); } if(!strcmp(content_type,"text/x-msmsgscontrol")){