changeset 22451:a0608437ee61

Fix a couple of memory leaks
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 12 Mar 2008 01:35:40 +0000
parents 57fef22fa7a8
children bb7b11ca28ca
files libpurple/log.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/log.c	Wed Mar 12 01:34:40 2008 +0000
+++ b/libpurple/log.c	Wed Mar 12 01:35:40 2008 +0000
@@ -1666,6 +1666,7 @@
 					}
 				}
 				fclose(index);
+				purple_stringref_unref(pathref);
 
 				return list;
 			}
@@ -1829,11 +1830,11 @@
 			purple_debug_warning("log", "Failed to rename index temp file \"%s\" to \"%s\": %s\n",
 			                   index_tmp, pathstr, g_strerror(errno));
 			g_unlink(index_tmp);
-			g_free(index_tmp);
 		}
 		else
 			purple_debug_info("log", "Built index: %s\n", pathstr);
 
+		g_free(index_tmp);
 		g_free(pathstr);
 	}
 	return list;