changeset 11044:8bf376579177

[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 <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Jun 2005 05:41:43 +0000
parents 629cbfd1ed6d
children d456fdaf6c73
files src/protocols/yahoo/yahoochat.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);