org.guifications.plugins: 636b74f1e63e6d49da87862b4f2ff0e2b7497674
nosnilmot at guifications.org
nosnilmot at guifications.org
Wed Apr 23 09:45:09 CDT 2008
-----------------------------------------------------------------
Revision: 636b74f1e63e6d49da87862b4f2ff0e2b7497674
Ancestor: 8b7205059f62d7bd12ea5cb6a024182c74f42a74
Author: nosnilmot at guifications.org
Date: 2008-04-23T14:35:41
Branch: org.guifications.plugins
Modified files:
oldlogger/oldlogger.c
ChangeLog:
Leak fixes and error path fix
-----------------------------------------------------------------
This revision's diffstat output:
oldlogger.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
-------------- next part --------------
============================================================
--- oldlogger/oldlogger.c 774fab2c469ac5b102ec7704738d8fb98e8ed1ef
+++ oldlogger/oldlogger.c eeab9881df0069516f7859ae8c85644ea0e349b1
@@ -114,7 +114,7 @@ static void old_logger_update_index(Purp
struct stat st;
char *index_path;
char *index_data;
- GError *error;
+ GError *error = NULL;
int index_fd;
char *index_tmp;
FILE *index;
@@ -146,7 +146,6 @@ static void old_logger_update_index(Purp
if ((index_fd = g_mkstemp(index_tmp)) == -1) {
purple_debug_error("log", "Failed to open index temp file: %s\n",
strerror(errno));
- g_error_free(error);
g_free(index_path);
g_free(index_data);
g_free(index_tmp);
@@ -177,8 +176,11 @@ static void old_logger_update_index(Purp
purple_debug_warning("log", "Failed to rename index temp file \"%s\" to \"%s\": %s\n",
index_tmp, index_path, strerror(errno));
g_unlink(index_tmp);
- g_free(index_tmp);
}
+
+ g_free(index_tmp);
+ g_free(index_path);
+ g_free(index_data);
}
static void old_logger_finalize(PurpleLog *log)
More information about the Plugins-commits
mailing list