# HG changeset patch # User Richard Laager # Date 1120110103 0 # Node ID 8bf376579177bf4741f428d751df93963e60c48e # Parent 629cbfd1ed6d9a9d4e7c735634e36b7b7acd0659 [gaim-migrate @ 12958] 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. committer: Tailor Script diff -r 629cbfd1ed6d -r 8bf376579177 src/protocols/yahoo/yahoochat.c --- a/src/protocols/yahoo/yahoochat.c Thu Jun 30 05:33:05 2005 +0000 +++ b/src/protocols/yahoo/yahoochat.c Thu Jun 30 05:41:43 2005 +0000 @@ -158,6 +158,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); @@ -187,6 +188,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 */ @@ -586,6 +593,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);