[Pidgin] #3281: msimppl leaks memory in statstring, username, key_context, storing user info, user, MsimMessage dictionary parsing

Pidgin trac at pidgin.im
Sun Feb 24 19:29:17 EST 2008


#3281: msimppl leaks memory in statstring, username, key_context, storing user
info, user, MsimMessage dictionary parsing
----------------------+-----------------------------------------------------
  Reporter:  jeff     |       Owner:  jeff    
      Type:  defect   |      Status:  closed  
  Priority:  major    |   Milestone:  2.4.0   
 Component:  MySpace  |     Version:  2.2.0   
Resolution:  fixed    |    Keywords:  msimprpl
   Pending:  0        |  
----------------------+-----------------------------------------------------
Changes (by jeff):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 >09/24/2007 10:22:05 PM changed by oliver
 >I ran the latest version (revision
 31d62e1a78974a0239e86bfeb42b29ab75216114) and it looks much better. Only
 the
 >msim_msg_dictionary_parse (message.c:1197) leak remains but it's a rather
 big leak.
 >
 >Not sure what to do about it as I'm not familiar with that part but
 judging from your comment it sounds like there might be
 >hope. What about g_strdup'ing inside msim_msg_append() and then free'ing
 it whenever you're done with the msg ? In that way
 >the string literals wont cause problems.
 Hmm. This would work but require a lot of g_strdup()s in the common case.
 Dynamic names are only used in msim_msg_dictionary_parse(), so I instead
 in fbe90f886e5d8d0dae0ad4d461dfa9f08e5de32a made a flag inside
 MsimMessageElement to tell whether the string is dynamic and should be
 freed. msim_msg_append_dynamic_name() is now used by
 msim_msg_dictionary_parse(), so these leaks should now be fixed (have not
 verified with valgrind, however).

 The GString and encrypted data free bugs have also been fixed previously,
 so this bug should be resolved. Please re-open and comment if the
 msim_msg_dictionary_parse() leak still exists, or file new bugs for
 additional leaks.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/3281#comment:9>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list