[balsa] Do not leak file descriptors whenever Mailbox::add_messages is called.
- From: Pawel Salek <pawels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Do not leak file descriptors whenever Mailbox::add_messages is called.
- Date: Mon, 5 Apr 2010 18:01:01 +0000 (UTC)
commit 100ae49003ff95f8db76315e134df4af61151926
Author: Pawel Salek <pawsa0 gmail com>
Date: Mon Apr 5 20:01:41 2010 +0200
Do not leak file descriptors whenever Mailbox::add_messages is called.
ChangeLog | 5 +++++
libbalsa/mailbox.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 857eab5..64b24c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-05 Pawel Salek
+
+ * libbalsa/mailbox.c: Mailbox::add_messages would leak a file descriptor
+ each time it was called.
+
2010-03-29 Peter Bloomfield
* src/balsa-index.c (bndx_instance_init),
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index cdb25bf..a2a79ad 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -1781,7 +1781,7 @@ msg_iterator(LibBalsaMessageFlag *flg, GMimeStream **stream, void *arg)
*flg = amd->flags;
*stream = amd->stream;
/* Make sure ::add_messages does not destroy the stream. */
- g_object_ref(amd->stream);
+ if (!res) g_object_ref(amd->stream);
return res;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]