pidgin/purple-plugin-pack

Leak fixes and error path fix
org.guifications.plugins
2008-04-23, nosnilmot
a4b99cbee1e0
Parents 2b690b497f62
Children 9d5e59974b1d
Leak fixes and error path fix
--- a/oldlogger/oldlogger.c Wed Apr 23 05:26:38 2008 -0400
+++ b/oldlogger/oldlogger.c Wed Apr 23 14:35:41 2008 -0400
@@ -114,7 +114,7 @@
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 @@
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 @@
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)