pidgin: 4d71374b: Fix a couple of memory leaks

nosnilmot at pidgin.im nosnilmot at pidgin.im
Tue Mar 11 21:50:49 EDT 2008


-----------------------------------------------------------------
Revision: 4d71374be2e0f5bd11b3ba2e3d5d2564acd90236
Ancestor: 5c34be2e2afa892d272763a3b1404664cc513e2d
Author: nosnilmot at pidgin.im
Date: 2008-03-12T01:35:40
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4d71374be2e0f5bd11b3ba2e3d5d2564acd90236

Modified files:
        libpurple/log.c

ChangeLog: 

Fix a couple of memory leaks

-------------- next part --------------
============================================================
--- libpurple/log.c	0a150afe4dffb81e04ac49e93cfc20c2d16858db
+++ libpurple/log.c	aadd0b8cc71ffd069a06984b1eda95ac01da3b43
@@ -1666,6 +1666,7 @@ static GList *old_logger_list(PurpleLogT
 					}
 				}
 				fclose(index);
+				purple_stringref_unref(pathref);
 
 				return list;
 			}
@@ -1829,11 +1830,11 @@ static GList *old_logger_list(PurpleLogT
 			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;


More information about the Commits mailing list