aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/msn/ns.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/msn/ns.c')
-rw-r--r--protocols/msn/ns.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c
index 2f656ea5..ca3c38e2 100644
--- a/protocols/msn/ns.c
+++ b/protocols/msn/ns.c
@@ -270,25 +270,11 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts )
{
if( num_parts == 5 )
{
- int i, groupcount;
-
- groupcount = atoi( cmd[4] );
- if( groupcount > 0 )
- {
- /* valgrind says this is leaking memory, I'm guessing
- that this happens during server redirects. */
- if( md->grouplist )
- {
- for( i = 0; i < md->groupcount; i ++ )
- g_free( md->grouplist[i] );
- g_free( md->grouplist );
- }
-
- md->groupcount = groupcount;
+ md->buddycount = atoi( cmd[3] );
+ md->groupcount = atoi( cmd[4] );
+ if( md->groupcount > 0 )
md->grouplist = g_new0( char *, md->groupcount );
- }
- md->buddycount = atoi( cmd[3] );
if( !*cmd[3] || md->buddycount == 0 )
msn_logged_in( ic );
}