im.pidgin.pidgin: 1e8c3f6ec50a7e8ea15b850e7e2974e273c1cb6c

datallah at pidgin.im datallah at pidgin.im
Thu Oct 18 16:25:46 EDT 2007


-----------------------------------------------------------------
Revision: 1e8c3f6ec50a7e8ea15b850e7e2974e273c1cb6c
Ancestor: 4341e599d112f3be408cb2a92fa459cc7c25b29c
Author: datallah at pidgin.im
Date: 2007-10-18T20:20:57
Branch: im.pidgin.pidgin

Modified files:
        libpurple/notify.c libpurple/protocols/msn/httpconn.c
        libpurple/protocols/msn/switchboard.c
        libpurple/protocols/msn/user.c pidgin/gtkimhtml.c

ChangeLog: 

Fix some leaks caused by misuse of g_list_remove_link() instead of g_list_delete_link().

-------------- next part --------------
============================================================
--- libpurple/notify.c	7114b0c8378cc5a0842800d9e27eed2ceb41fcc1
+++ libpurple/notify.c	74e804e929ac977b4fd65e2d643bd2d5f1937bcd
@@ -691,7 +691,7 @@ purple_notify_user_info_remove_last_item
 	GList *last = g_list_last(user_info->user_info_entries);
 	if (last) {
 		purple_notify_user_info_entry_destroy(last->data);
-		user_info->user_info_entries = g_list_remove_link(user_info->user_info_entries, last);
+		user_info->user_info_entries = g_list_delete_link(user_info->user_info_entries, last);
 	}
 }
 
============================================================
--- libpurple/protocols/msn/httpconn.c	b5321bc2cf45112e240979eb85ad6ef1fd9aa52e
+++ libpurple/protocols/msn/httpconn.c	5bf2bf3549f33d621de9ed37eda52dc472ce0ca6
@@ -692,7 +692,7 @@ msn_httpconn_destroy(MsnHttpConn *httpco
 
 		queue_data = (MsnHttpQueueData *) httpconn->queue->data;
 
-		httpconn->queue = g_list_remove_link(httpconn->queue, httpconn->queue);
+		httpconn->queue = g_list_delete_link(httpconn->queue, httpconn->queue);
 
 		g_free(queue_data->body);
 		g_free(queue_data);
============================================================
--- libpurple/protocols/msn/switchboard.c	d708d05dc7fd908df08bac61d702ef8261a0beeb
+++ libpurple/protocols/msn/switchboard.c	91a914d5b9777ae516f73208a90fbe33a0751638
@@ -108,7 +108,7 @@ msn_switchboard_destroy(MsnSwitchBoard *
 	g_free(swboard->auth_key);
 	g_free(swboard->session_id);
 
-	for (; swboard->users; swboard->users = g_list_remove_link(swboard->users, swboard->users))
+	for (; swboard->users; swboard->users = g_list_delete_link(swboard->users, swboard->users))
 		g_free(swboard->users->data);
 
 	session = swboard->session;
@@ -735,10 +735,9 @@ msg_cmd_post(MsnCmdProc *cmdproc, MsnCom
 	msn_message_show_readable(msg, "SB RECV", FALSE);
 #endif
 
-	if (msg->remote_user != NULL)
-		g_free (msg->remote_user);
-
+	g_free (msg->remote_user);
 	msg->remote_user = g_strdup(cmd->params[0]);
+
 	msn_cmdproc_process_msg(cmdproc, msg);
 
 	msn_message_destroy(msg);
============================================================
--- libpurple/protocols/msn/user.c	ebd6b636e437584fcc8c1d8eeb08d9000f9e2210
+++ libpurple/protocols/msn/user.c	e60aa8f4487d61998df6a15818cb9b5fd708cebe
@@ -383,7 +383,7 @@ msn_user_remove_group_id(MsnUser *user, 
 		return;
 
 	g_free(l->data);
-	user->group_ids = g_list_remove_link(user->group_ids, l);
+	user->group_ids = g_list_delete_link(user->group_ids, l);
 }
 
 void
============================================================
--- pidgin/gtkimhtml.c	5da45f5e789c81e8967f951df1dcca1016a57791
+++ pidgin/gtkimhtml.c	b2106bd24615e4e1df5b5c372160fbfe1058dddc
@@ -3131,9 +3131,10 @@ gtk_imhtml_delete(GtkIMHtml *imhtml, Gtk
 		gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer,
 			&i, sd->mark);
 		if (gtk_text_iter_in_range(&i, start, end)) {
-			GtkIMHtmlScalable *scale = sd->scalable;
+			GtkIMHtmlScalable *scale = GTK_IMHTML_SCALABLE(sd->scalable);
 			scale->free(scale);
-			imhtml->scalables = g_list_remove_link(imhtml->scalables, l);
+			g_free(sd);
+			imhtml->scalables = g_list_delete_link(imhtml->scalables, l);
 		}
 		l = next;
 	}


More information about the Commits mailing list