changeset 16610:60aae7ef3b7e

merge of '480a88680eddc079fa124c4db25edc86e2a3fc03' and 'ced1da5fdb05f0972dc4d31a4c77f4fc7b844d1d'
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 29 Apr 2007 00:09:42 +0000
parents 598b66923c81 (current diff) 2ddffaf3613a (diff)
children f130f097e378 4b7b9bb4ce34
files
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/core.c	Sat Apr 28 23:40:08 2007 +0000
+++ b/libpurple/core.c	Sun Apr 29 00:09:42 2007 +0000
@@ -401,8 +401,9 @@
 			if (!strcmp(entry, "logs"))
 			{
 				char buf[MAXPATHLEN];
+				size_t linklen;
 
-				if (readlink(name, buf, sizeof(buf) - 1) == -1)
+				if ((linklen = readlink(name, buf, sizeof(buf) - 1) == -1))
 				{
 					purple_debug_error("core", "Error reading symlink %s: %s\n",
 					                   name, strerror(errno));
@@ -412,7 +413,7 @@
 					g_free(old_user_dir);
 					return FALSE;
 				}
-				buf[sizeof(buf) - 1] = '\0';
+				buf[linklen] = '\0';
 
 				logs_dir = g_strconcat(user_dir, G_DIR_SEPARATOR_S "logs", NULL);
 
--- a/libpurple/notify.c	Sat Apr 28 23:40:08 2007 +0000
+++ b/libpurple/notify.c	Sun Apr 29 00:09:42 2007 +0000
@@ -521,6 +521,7 @@
 	}
 	
 	g_list_free(user_info->user_info_entries);
+	g_free(user_info);
 }
 
 GList *