changeset 20956:2101ebd66f15

merge of '8dfaab508a354f388e2c597bd4eef6e0703fa790' and 'a29ccbb63a3c059184a3bacefa036a13af45e808'
author Casey Harkins <charkins@pidgin.im>
date Mon, 15 Oct 2007 22:18:15 +0000
parents f7f1e893236c (diff) 111f4b8084b0 (current diff)
children 1ec2b67e9bc1
files
diffstat 4 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntfilesel.c	Mon Oct 15 22:16:57 2007 +0000
+++ b/finch/libgnt/gntfilesel.c	Mon Oct 15 22:18:15 2007 +0000
@@ -265,6 +265,7 @@
 		}
 		g_free(fp);
 	}
+	g_dir_close(dir);
 
 	*files = g_list_reverse(*files);
 	return TRUE;
--- a/libpurple/notify.c	Mon Oct 15 22:16:57 2007 +0000
+++ b/libpurple/notify.c	Mon Oct 15 22:18:15 2007 +0000
@@ -688,8 +688,11 @@
 void
 purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info)
 {
-	user_info->user_info_entries = g_list_remove(user_info->user_info_entries,
-												 g_list_last(user_info->user_info_entries)->data);
+	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);
+	}
 }
 
 void *
--- a/libpurple/notify.h	Mon Oct 15 22:16:57 2007 +0000
+++ b/libpurple/notify.h	Mon Oct 15 22:18:15 2007 +0000
@@ -539,7 +539,7 @@
 void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value);
 
 /**
- * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object
+ * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object without freeing the entry.
  *
  * @param user_info          The PurpleNotifyUserInfo
  * @param user_info_entry    The PurpleNotifyUserInfoEntry
--- a/libpurple/protocols/msn/msn.c	Mon Oct 15 22:16:57 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Mon Oct 15 22:18:15 2007 +0000
@@ -1594,7 +1594,6 @@
 	gboolean sect_info = FALSE;
 	gboolean has_contact_info = FALSE;
 	char *url_buffer;
-	GString *s, *s2;
 	int stripped_len;
 #if PHOTO_SUPPORT
 	char *photo_url_text = NULL;
@@ -1679,11 +1678,6 @@
 	purple_debug_misc("msn", "stripped = %p\n", stripped);
 	purple_debug_misc("msn", "url_buffer = %p\n", url_buffer);
 
-	/* Gonna re-use the memory we've already got for url_buffer */
-	/* No we're not. */
-	s = g_string_sized_new(strlen(url_buffer));
-	s2 = g_string_sized_new(strlen(url_buffer));
-
 	/* General section header */
 	if (has_tooltip_text)
 		purple_notify_user_info_add_section_break(user_info);
@@ -2030,7 +2024,7 @@
 		purple_debug_warning("msn", "invalid connection. ignoring buddy photo info.\n");
 		g_free(stripped);
 		g_free(url_buffer);
-		g_free(user_info);
+		purple_notify_user_info_destroy(user_info);
 		g_free(info_data->name);
 		g_free(info_data);
 		g_free(photo_url_text);