comparison libpurple/protocols/msn/contact.c @ 21833:068b412ba385

part of the series of patches from QuLogic that fixes a use-after-free, References #4382
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 16 Dec 2007 00:34:21 +0000
parents 38cc722159ff
children 207f51e16b50 b70f30dd4753
comparison
equal deleted inserted replaced
21832:8d5989d932c9 21833:068b412ba385
1287 1287
1288 /* create and add the new group to the userlist */ 1288 /* create and add the new group to the userlist */
1289 purple_debug_info("MSNCL", "Adding group %s with guid = %s to the userlist\n", state->new_group_name, guid); 1289 purple_debug_info("MSNCL", "Adding group %s with guid = %s to the userlist\n", state->new_group_name, guid);
1290 msn_group_new(session->userlist, guid, state->new_group_name); 1290 msn_group_new(session->userlist, guid, state->new_group_name);
1291 1291
1292 g_free(guid);
1293
1294 if (state->action & MSN_ADD_BUDDY) { 1292 if (state->action & MSN_ADD_BUDDY) {
1295 msn_userlist_add_buddy(session->userlist, 1293 msn_userlist_add_buddy(session->userlist,
1296 state->who, 1294 state->who,
1297 state->new_group_name); 1295 state->new_group_name);
1298 } else if (state->action & MSN_MOVE_BUDDY) { 1296 } else if (state->action & MSN_MOVE_BUDDY) {
1299 msn_add_contact_to_group(session->contact, state, state->who, guid); 1297 msn_add_contact_to_group(session->contact, state, state->who, guid);
1298 g_free(guid);
1300 return; 1299 return;
1301 } 1300 }
1301 g_free(guid);
1302 } else { 1302 } else {
1303 purple_debug_info("MSNCL", "Adding group %s failed\n", 1303 purple_debug_info("MSNCL", "Adding group %s failed\n",
1304 state->new_group_name); 1304 state->new_group_name);
1305 } 1305 }
1306 } 1306 }