Mercurial > pidgin.yaz
changeset 20930:d0fdf2f95277
Leak fix.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sun, 14 Oct 2007 20:25:20 +0000 |
parents | 76df08dd7d7b |
children | f56e94167372 |
files | libpurple/plugins/log_reader.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c Sun Oct 14 20:03:55 2007 +0000 +++ b/libpurple/plugins/log_reader.c Sun Oct 14 20:25:20 2007 +0000 @@ -2671,12 +2671,16 @@ /* 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); }