im.pidgin.pidgin: 29b2fc4762e2c5d03a7100c78f2a7b49237c5e80

datallah at pidgin.im datallah at pidgin.im
Sun Oct 14 16:40:43 EDT 2007


-----------------------------------------------------------------
Revision: 29b2fc4762e2c5d03a7100c78f2a7b49237c5e80
Ancestor: 25148666afa153d299e40d80150d8f634248d1f5
Author: datallah at pidgin.im
Date: 2007-10-14T20:25:20
Branch: im.pidgin.pidgin

Modified files:
        libpurple/plugins/log_reader.c

ChangeLog: 

Leak fix.

-------------- next part --------------
============================================================
--- libpurple/plugins/log_reader.c	5a4961d4c829f13b002d7612f24eec47b8550f5f
+++ libpurple/plugins/log_reader.c	260cee0ddf63a47ede07ff21c402788faea1ab3f
@@ -2671,12 +2671,16 @@ init_plugin(PurplePlugin *plugin)
 
 	/* Calculate default aMSN log directory. */
 #ifdef _WIN32
+	path = NULL;
 	folder = wpurple_get_special_folder(CSIDL_PROFILE); /* Silly aMSN, not using CSIDL_APPDATA */
-	path = g_build_filename(folder, "amsn", NULL);
+	if (folder) {
+		path = g_build_filename(folder, "amsn", NULL);
+		g_free(folder);
+	}
 #else
 	path = g_build_filename(purple_home_dir(), ".amsn", NULL);
 #endif
-	purple_prefs_add_string("/plugins/core/log_reader/amsn/log_directory", path);
+	purple_prefs_add_string("/plugins/core/log_reader/amsn/log_directory", path ? path : "");
 	g_free(path);
 }
 


More information about the Commits mailing list