Mercurial > pidgin
comparison libpurple/protocols/qq/group_opt.c @ 24858:09521734fe40
Fix a potential leak "KuSh" discovered using "cppcheck". Fixes #7861.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 22 Dec 2008 16:17:28 +0000 |
parents | 8f757b2139d2 |
children | 351d07aefb09 |
comparison
equal
deleted
inserted
replaced
24857:4455637864b4 | 24858:09521734fe40 |
---|---|
414 | 414 |
415 g_return_if_fail(ext_id > 0 && member_id > 0); | 415 g_return_if_fail(ext_id > 0 && member_id > 0); |
416 | 416 |
417 bytes += qq_get_vstr(&reason, QQ_CHARSET_DEFAULT, data + bytes); | 417 bytes += qq_get_vstr(&reason, QQ_CHARSET_DEFAULT, data + bytes); |
418 | 418 |
419 add_req = g_new0(qq_room_req, 1); | |
420 add_req->gc = gc; | |
421 add_req->id = id; | |
422 add_req->member = member_id; | |
423 | |
424 purple_debug_info("QQ", "%u requested to join room, ext id %u\n", member_id, ext_id); | 419 purple_debug_info("QQ", "%u requested to join room, ext id %u\n", member_id, ext_id); |
425 | 420 |
426 rmd = qq_room_data_find(gc, id); | 421 rmd = qq_room_data_find(gc, id); |
427 g_return_if_fail(rmd != NULL); | 422 g_return_if_fail(rmd != NULL); |
428 if (qq_room_buddy_find(rmd, member_id)) { | 423 if (qq_room_buddy_find(rmd, member_id)) { |
440 qq_request_buddy_info(gc, member_id, 0, QQ_BUDDY_INFO_DISPLAY); | 435 qq_request_buddy_info(gc, member_id, 0, QQ_BUDDY_INFO_DISPLAY); |
441 } | 436 } |
442 who = uid_to_purple_name(member_id); | 437 who = uid_to_purple_name(member_id); |
443 msg = g_strdup_printf(_("%u request to join Qun %u"), member_id, ext_id); | 438 msg = g_strdup_printf(_("%u request to join Qun %u"), member_id, ext_id); |
444 | 439 |
440 add_req = g_new0(qq_room_req, 1); | |
441 add_req->gc = gc; | |
442 add_req->id = id; | |
443 add_req->member = member_id; | |
444 | |
445 purple_request_action(gc, _("QQ Qun Operation"), | 445 purple_request_action(gc, _("QQ Qun Operation"), |
446 msg, reason, | 446 msg, reason, |
447 PURPLE_DEFAULT_ACTION_NONE, | 447 PURPLE_DEFAULT_ACTION_NONE, |
448 purple_connection_get_account(gc), who, NULL, | 448 purple_connection_get_account(gc), who, NULL, |
449 add_req, 2, | 449 add_req, 2, |