[balsa] mailbox_local: Do not leak reference to message
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] mailbox_local: Do not leak reference to message
- Date: Mon, 16 May 2022 23:15:58 +0000 (UTC)
commit 58a5fc4a04005d2bde7094d42b480ae486000057
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Mon May 16 18:44:40 2022 -0400
mailbox_local: Do not leak reference to message
libbalsa/mailbox_local.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libbalsa/mailbox_local.c b/libbalsa/mailbox_local.c
index c4e246973..942df72d9 100644
--- a/libbalsa/mailbox_local.c
+++ b/libbalsa/mailbox_local.c
@@ -853,12 +853,17 @@ message_match_real(LibBalsaMailbox *mailbox, guint msgno,
lbm_local_cache_message(local, msgno, message);
entry = libbalsa_mailbox_get_index_entry(mailbox, msgno);
info = g_ptr_array_index(priv->threading_info, msgno - 1);
- if (entry == NULL || info == NULL)
+ if (entry == NULL || info == NULL) {
+ g_object_unref(message);
return FALSE;
+ }
}
- if (entry->idle_pending)
+ if (entry->idle_pending) {
+ if (message != NULL)
+ g_object_unref(message);
return FALSE; /* Can't match. */
+ }
switch (cond->type) {
case CONDITION_STRING:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]