pidgin: bc05f646: Fix a potential leak "KuSh" discovered u...

datallah at pidgin.im datallah at pidgin.im
Mon Dec 22 12:05:57 EST 2008


-----------------------------------------------------------------
Revision: bc05f646734142ed0e42f34e38436168db5c6d9c
Ancestor: 257e0418889f66cfd4b2748653d5ef12a1eb2cdc
Author: datallah at pidgin.im
Date: 2008-12-22T16:17:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/bc05f646734142ed0e42f34e38436168db5c6d9c

Modified files:
        libpurple/protocols/qq/group_opt.c

ChangeLog: 

Fix a potential leak "KuSh" discovered using "cppcheck". Fixes #7861.

-------------- next part --------------
============================================================
--- libpurple/protocols/qq/group_opt.c	ea334392f4af6ee9653c950ebb1bb58fa79a41e2
+++ libpurple/protocols/qq/group_opt.c	3c9fe02071a3a178b36d91390b6e2135452f5cf6
@@ -416,11 +416,6 @@ void qq_process_room_buddy_request_join(
 
 	bytes += qq_get_vstr(&reason, QQ_CHARSET_DEFAULT, data + bytes);
 
-	add_req = g_new0(qq_room_req, 1);
-	add_req->gc = gc;
-	add_req->id = id;
-	add_req->member = member_id;
-
 	purple_debug_info("QQ", "%u requested to join room, ext id %u\n", member_id, ext_id);
 
 	rmd = qq_room_data_find(gc, id);
@@ -442,6 +437,11 @@ void qq_process_room_buddy_request_join(
 	who = uid_to_purple_name(member_id);
 	msg = g_strdup_printf(_("%u request to join Qun %u"), member_id, ext_id);
 
+	add_req = g_new0(qq_room_req, 1);
+	add_req->gc = gc;
+	add_req->id = id;
+	add_req->member = member_id;
+
 	purple_request_action(gc, _("QQ Qun Operation"),
 			msg, reason,
 			PURPLE_DEFAULT_ACTION_NONE,


More information about the Commits mailing list