Mercurial > pidgin
comparison libpurple/log.c @ 22462:a0608437ee61
Fix a couple of memory leaks
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 12 Mar 2008 01:35:40 +0000 |
parents | a031a4fd6a7d |
children | f2045aae33b8 |
comparison
equal
deleted
inserted
replaced
22461:57fef22fa7a8 | 22462:a0608437ee61 |
---|---|
1664 log->logger_data = data; | 1664 log->logger_data = data; |
1665 list = g_list_prepend(list, log); | 1665 list = g_list_prepend(list, log); |
1666 } | 1666 } |
1667 } | 1667 } |
1668 fclose(index); | 1668 fclose(index); |
1669 purple_stringref_unref(pathref); | |
1669 | 1670 |
1670 return list; | 1671 return list; |
1671 } | 1672 } |
1672 } | 1673 } |
1673 } | 1674 } |
1827 if (g_rename(index_tmp, pathstr)) | 1828 if (g_rename(index_tmp, pathstr)) |
1828 { | 1829 { |
1829 purple_debug_warning("log", "Failed to rename index temp file \"%s\" to \"%s\": %s\n", | 1830 purple_debug_warning("log", "Failed to rename index temp file \"%s\" to \"%s\": %s\n", |
1830 index_tmp, pathstr, g_strerror(errno)); | 1831 index_tmp, pathstr, g_strerror(errno)); |
1831 g_unlink(index_tmp); | 1832 g_unlink(index_tmp); |
1832 g_free(index_tmp); | |
1833 } | 1833 } |
1834 else | 1834 else |
1835 purple_debug_info("log", "Built index: %s\n", pathstr); | 1835 purple_debug_info("log", "Built index: %s\n", pathstr); |
1836 | 1836 |
1837 g_free(index_tmp); | |
1837 g_free(pathstr); | 1838 g_free(pathstr); |
1838 } | 1839 } |
1839 return list; | 1840 return list; |
1840 } | 1841 } |
1841 | 1842 |