Changeset 43d8cc5 for protocols


Ignore:
Timestamp:
2007-06-13T23:31:18Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
998b103
Parents:
7e9dc74
Message:

Fixed a memory management problem that caused some strange nickname issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r7e9dc74 r43d8cc5  
    447447{
    448448        user_t *u = user_findhandle( ic, handle );
    449         char newnick[MAX_NICK_LENGTH+1];
     449        char newnick[MAX_NICK_LENGTH+1], *orig_nick;
    450450       
    451451        if( u && !u->online && !nick_saved( ic->acc, handle ) )
     
    465465                nick_dedupe( ic->acc, handle, newnick );
    466466               
    467                 user_rename( ic->irc, u->nick, newnick );
     467                /* u->nick will be freed halfway the process, so it can't be
     468                   passed as an argument. */
     469                orig_nick = g_strdup( u->nick );
     470                user_rename( ic->irc, orig_nick, newnick );
     471                g_free( orig_nick );
    468472        }
    469473}
Note: See TracChangeset for help on using the changeset viewer.