[balsa/gtk3] Do not leak open file on error
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Do not leak open file on error
- Date: Mon, 16 Jul 2012 01:51:30 +0000 (UTC)
commit 55c657df0d1cbe62d1ede309bddc8a7ea62d7624
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 15 19:44:35 2012 -0400
Do not leak open file on error
* libbalsa/mailbox_imap.c (imap_cache_manager_new_from_file): do
not leak open file on error.
ChangeLog | 5 +++++
libbalsa/mailbox_imap.c | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1ff8780..497aba2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-15 Albrecht DreÃ
+ * libbalsa/mailbox_imap.c (imap_cache_manager_new_from_file): do
+ not leak open file on error.
+
+2012-07-15 Albrecht DreÃ
+
* libbalsa/filter-funcs.c (libbalsa_filter_export_sieve): do not
leak open file.
diff --git a/libbalsa/mailbox_imap.c b/libbalsa/mailbox_imap.c
index c2e130c..b1ce1e5 100644
--- a/libbalsa/mailbox_imap.c
+++ b/libbalsa/mailbox_imap.c
@@ -3477,6 +3477,7 @@ imap_cache_manager_new_from_file(const char *header_cache_path)
}
if(fread(&i, sizeof(i), 1, f) != 1) {
printf("Could not read cache table size.\n");
+ fclose(f);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]