[Pidgin] #3245: Resource descriptor and memory leak in dnssrv.c and javver.c in libpurple

Pidgin trac at pidgin.im
Tue Sep 25 12:46:35 EDT 2007


#3245: Resource descriptor and memory leak in  dnssrv.c and javver.c in libpurple
------------------------+---------------------------------------------------
  Reporter:  emilal     |       Owner:        
      Type:  defect     |      Status:  closed
  Priority:  minor      |   Milestone:  2.2.1 
 Component:  libpurple  |     Version:  2.2.0 
Resolution:  fixed      |    Keywords:        
   Pending:  0          |  
------------------------+---------------------------------------------------
Comment (by emilal):

 See this code in javbber.c. In original version, there is only direct
 NULL-ed pointer. Why did you direct set the pointer to null, without
 releasing the memory?

 static void srv_resolved_cb(PurpleSrvResponse *resp, int results, gpointer
 data)
 {
 JabberStream *js;
 PurpleSrvQueryData *srv_query_data;
 js = data;
 srv_query_data = js->srv_query_data;
 // Emil changes
 js->srv_query_data = NULL;

 if(results) {
 jabber_login_connect(js, resp->hostname, resp->hostname, resp->port);
 g_free(resp);
 } else {
 jabber_login_connect(js, js->user->domain, js->user->domain,
 purple_account_get_int(js->gc->account, "port", 5222));
 }
 purple_srv_cancel(srv_query_data);
 }

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


More information about the Tracker mailing list