Ignore:
Timestamp:
2009-10-17T14:48:21Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
57d8421
Parents:
e71cfbc
Message:

Valgrind pointed me at some memory leaks in the Yahoo! codek, including one
that existed for a while already. Fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    re71cfbc r99c8f13  
    254254static GList *byahoo_away_states( struct im_connection *ic )
    255255{
    256         GList *m = NULL;
    257 
    258         m = g_list_append( m, "Available" );
    259         m = g_list_append( m, "Be Right Back" );
    260         m = g_list_append( m, "Busy" );
    261         m = g_list_append( m, "Not At Home" );
    262         m = g_list_append( m, "Not At Desk" );
    263         m = g_list_append( m, "Not In Office" );
    264         m = g_list_append( m, "On Phone" );
    265         m = g_list_append( m, "On Vacation" );
    266         m = g_list_append( m, "Out To Lunch" );
    267         m = g_list_append( m, "Stepped Out" );
    268         m = g_list_append( m, "Invisible" );
    269         m = g_list_append( m, GAIM_AWAY_CUSTOM );
     256        static GList *m = NULL;
     257
     258        if( m == NULL )
     259        {
     260                m = g_list_append( m, "Available" );
     261                m = g_list_append( m, "Be Right Back" );
     262                m = g_list_append( m, "Busy" );
     263                m = g_list_append( m, "Not At Home" );
     264                m = g_list_append( m, "Not At Desk" );
     265                m = g_list_append( m, "Not In Office" );
     266                m = g_list_append( m, "On Phone" );
     267                m = g_list_append( m, "On Vacation" );
     268                m = g_list_append( m, "Out To Lunch" );
     269                m = g_list_append( m, "Stepped Out" );
     270                m = g_list_append( m, "Invisible" );
     271                m = g_list_append( m, GAIM_AWAY_CUSTOM );
     272        }
    270273       
    271274        return m;
Note: See TracChangeset for help on using the changeset viewer.