Changeset ec29351


Ignore:
Timestamp:
2009-12-07T22:11:40Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ccba980
Parents:
36cf9fd
Message:

Committing some >1y old change. This seems to fix a small leak in the MSN
mail notification handler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    r36cf9fd rec29351  
    663663                                }
    664664                               
    665                                 if( arg1 ) g_free( arg1 );
    666                                 if( mtype ) g_free( mtype );
     665                                g_free( arg1 );
     666                                g_free( mtype );
    667667                        }
    668668                        else if( g_strncasecmp( ct, "text/x-msmsgsprofile", 20 ) == 0 )
     
    672672                        else if( g_strncasecmp( ct, "text/x-msmsgsinitialemailnotification", 37 ) == 0 )
    673673                        {
    674                                 char *inbox = msn_findheader( body, "Inbox-Unread:", blen );
    675                                 char *folders = msn_findheader( body, "Folders-Unread:", blen );
    676                                
    677                                 if( inbox && folders && set_getbool( &ic->acc->set, "mail_notifications" ) )
     674                                if( set_getbool( &ic->acc->set, "mail_notifications" ) )
    678675                                {
    679                                         imcb_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders );
     676                                        char *inbox = msn_findheader( body, "Inbox-Unread:", blen );
     677                                        char *folders = msn_findheader( body, "Folders-Unread:", blen );
     678
     679                                        if( inbox && folders )
     680                                                imcb_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders );
     681                                       
     682                                        g_free( inbox );
     683                                        g_free( folders );
    680684                                }
    681                                
    682                                 g_free( inbox );
    683                                 g_free( folders );
    684685                        }
    685686                        else if( g_strncasecmp( ct, "text/x-msmsgsemailnotification", 30 ) == 0 )
    686687                        {
    687                                 char *from = msn_findheader( body, "From-Addr:", blen );
    688                                 char *fromname = msn_findheader( body, "From:", blen );
    689                                
    690                                 if( from && fromname && set_getbool( &ic->acc->set, "mail_notifications" ) )
     688                                if( set_getbool( &ic->acc->set, "mail_notifications" ) )
    691689                                {
    692                                         imcb_log( ic, "Received an e-mail message from %s <%s>.", fromname, from );
     690                                        char *from = msn_findheader( body, "From-Addr:", blen );
     691                                        char *fromname = msn_findheader( body, "From:", blen );
     692                                       
     693                                        if( from && fromname )
     694                                                imcb_log( ic, "Received an e-mail message from %s <%s>.", fromname, from );
     695
     696                                        g_free( from );
     697                                        g_free( fromname );
    693698                                }
    694699                        }
Note: See TracChangeset for help on using the changeset viewer.