[evolution-activesync] eas-logger: fixed file leak
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-activesync] eas-logger: fixed file leak
- Date: Tue, 7 Jan 2014 07:31:57 +0000 (UTC)
commit 4413cfd7a5e73f23adde0ba8f4303b7023f0523f
Author: Patrick Ohly <patrick ohly intel com>
Date: Mon Jan 6 23:22:39 2014 -0800
eas-logger: fixed file leak
Found by cppcheck: when using log level G_LOG_LEVEL_ERROR in combination
with a debug file, the file was opened, not used and not closed.
Not sure what the intended result is. At least let's close the file.
libeasclient/eas-logger.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libeasclient/eas-logger.c b/libeasclient/eas-logger.c
index 0619983..c408975 100644
--- a/libeasclient/eas-logger.c
+++ b/libeasclient/eas-logger.c
@@ -26,6 +26,7 @@ void eas_logger (const gchar *log_domain,
}
if (log_level == G_LOG_LEVEL_ERROR) {
+ if (logfile) fclose (logfile);
g_log_default_handler (log_domain, log_level, message, user_data);
g_mutex_unlock (&g_mutex);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]