[balsa/gtk3] Do not leak FILE on error
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Do not leak FILE on error
- Date: Mon, 16 Jul 2012 02:59:04 +0000 (UTC)
commit 6765b0b17978c6e47290203bac9e6331a2aada91
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 15 22:47:15 2012 -0400
Do not leak FILE on error
* libbalsa/mailbox_imap.c (imap_cache_manager_new_from_file): do
not leak FILE on error.
ChangeLog | 5 +++++
libbalsa/mailbox_imap.c | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b67abca..054c6f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-15 Peter Bloomfield
+ * libbalsa/mailbox_imap.c (imap_cache_manager_new_from_file): do
+ not leak FILE on error.
+
+2012-07-15 Peter Bloomfield
+
* libbalsa/imap/pop3.c (pop_check_status): remove redundant else
clause.
diff --git a/libbalsa/mailbox_imap.c b/libbalsa/mailbox_imap.c
index b1ce1e5..7735bd0 100644
--- a/libbalsa/mailbox_imap.c
+++ b/libbalsa/mailbox_imap.c
@@ -3487,6 +3487,7 @@ imap_cache_manager_new_from_file(const char *header_cache_path)
fread(&icm->exists, sizeof(uint32_t), 1, f) != 1) {
imap_cache_manager_free(icm);
printf("Couldn't read cache - aborting...\n");
+ fclose(f);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]