[Pidgin] #3626: Two memory leaks in the MSN component

Pidgin trac at pidgin.im
Sat Oct 20 20:12:29 EDT 2007


#3626: Two memory leaks in the MSN component
-------------------+--------------------------------------------------------
Reporter:  oliver  |       Owner:  khc        
    Type:  defect  |      Status:  new        
Priority:  minor   |   Component:  MSN        
 Version:  2.2.1   |    Keywords:  memory leak
 Pending:  0       |  
-------------------+--------------------------------------------------------
 I ran valgrind on my application and i found a couple of memory leaks in
 the MSN component.
 I believe they are mostly related to this guy here (they all originate
 from "msn_soap_request_new" in a way or another):

     by 0x4125A5D: g_malloc0 (in /usr/lib/libglib-2.0.so.0.1400.1)

     by 0x4A7D10E: msn_soap_request_new (soap.c:705)

     by 0x4A67822: msn_add_contact_to_group (contact.c:1191)

     by 0x4A84B34: msn_userlist_add_buddy (userlist.c:741)

     by 0x4A6C6D4: msn_add_buddy (msn.c:1140)

     by 0x405F74C: purple_account_add_buddy (account.c:2043)

 I believe this can be fixed by adding
                         msn_soap_request_free(request);
 after line 753 in soap.c
                                 msn_soap_post_request(soapconn,request);
 It doesn't look like "request" is used after the post_request() call.




 The other one is this guy here:

     by 0x413E8AA: g_strsplit (in /usr/lib/libglib-2.0.so.0.1400.1)

     by 0x4A7381C: msn_notification_send_fqy (notification.c:728)

     by 0x4A67C62: msn_add_contact_to_group_read_cb (contact.c:1115)

     by 0x4A7E22E: msn_soap_read_cb (soap.c:567)


 "tokens" is g_free'd in line 738 but you need to
 use g_strfreev() cause it's a vector of strings.

-- 
Ticket URL: <https://developer.pidgin.im/ticket/3626>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list