[balsa/wip/gtk4: 154/351] Do not leak cbdata



commit 667eb8a12c13e278441ff98bc38c148f509b4524
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Feb 8 14:01:07 2018 -0500

    Do not leak cbdata

 libbalsa/mailbox_imap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libbalsa/mailbox_imap.c b/libbalsa/mailbox_imap.c
index 568f550..2bbb8ed 100644
--- a/libbalsa/mailbox_imap.c
+++ b/libbalsa/mailbox_imap.c
@@ -1570,6 +1570,7 @@ GHashTable * libbalsa_mailbox_imap_get_matchings(LibBalsaMailboxImap* mbox,
     ImapSearchKey* query;
     ImapResponse rc = IMR_NO;
     ImapSearchData * cbdata;
+    GHashTable * res;
 
     *err = FALSE;
     
@@ -1609,7 +1610,9 @@ GHashTable * libbalsa_mailbox_imap_get_matchings(LibBalsaMailboxImap* mbox,
                               "falling back to default searching method"),
                             LIBBALSA_MAILBOX(mbox)->url);
     };
-    return cbdata->res;
+    res = cbdata->res;
+    g_free(cbdata);
+    return res;
 }
 
 /* Returns false if the conditions contain regex matches


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]