gaim/gaim

Patch #1229320 from Bleeter
oldstatus
2005-06-30, Richard Laager
8243b4e04e18
Parents 4c3d11607e6d
Children a99a17a99a8f
Patch #1229320 from Bleeter

"I couldn't get anyone to confirm that doing this is correct, however to me it would seem that I'm leaking on a couple of the privacy_checks inside the yahoo prpl. Here's a fix. This also includes privacy wrapper for the conference decline function, used in some booters."

(00:37:39) Bleeter: ... we're returning out of the function, and those things are freed further down if the function isn't returned
(00:38:18) Bleeter: so it makes sense to free them before the return. I'm just unsure because they'reprevious patches which were applied without these checks being picked up

That makes sense to me. It looks good.
--- a/src/protocols/yahoo/yahoochat.c Thu Jun 30 01:31:50 2005 -0400
+++ b/src/protocols/yahoo/yahoochat.c Thu Jun 30 01:43:44 2005 -0400
@@ -161,6 +161,7 @@
if (!yahoo_privacy_check(gc, who)) {
gaim_debug_info("yahoo",
"Invite to conference %s from %s has been dropped.\n", room, who);
+ g_string_free(members, TRUE);
return;
}
serv_got_chat_invite(gc, room, who, msg, components);
@@ -190,6 +191,12 @@
break;
}
}
+ if (!yahoo_privacy_check(gc, who)) {
+ g_free(room);
+ if (msg != NULL)
+ g_free(msg);
+ return;
+ }
if (who && room) {
/* make sure we're in the room before we process a decline message for it */
@@ -589,6 +596,10 @@
if (!yahoo_privacy_check(gc, who)) {
gaim_debug_info("yahoo",
"Invite to room %s from %s has been dropped.\n", room, who);
+ if (room != NULL)
+ g_free(room);
+ if (msg != NULL)
+ g_free(msg);
return;
}
serv_got_chat_invite(gc, room, who, msg, components);