[balsa/gtk3] Do not leak object refs on error



commit 3e7b7ebc5ee7d5ebfc681a567f7dc40e5d8a37c4
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sat Mar 16 11:51:35 2013 -0400

    Do not leak object refs on error
    
        * src/main-window.c: do not leak object refs on error.

 ChangeLog         |    4 ++++
 src/main-window.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 14c82b3..97e739d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-03-16  Peter Bloomfield
 
+       * src/main-window.c: do not leak object refs on error.
+
+2013-03-16  Peter Bloomfield
+
        * src/mailbox-node.c (balsa_mailbox_node_dispose): make sure
        LibBalsaMailboxView::open is correct before saving the view.
 
diff --git a/src/main-window.c b/src/main-window.c
index 7477e58..04f222b 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -2348,6 +2348,8 @@ bw_real_open_mbnode_idle_cb(BalsaWindowRealOpenMbnodeInfo * info)
 
     if (!window) {
         g_free(info->message);
+        g_object_unref(g_object_ref_sink(index));
+        g_object_unref(mbnode);
         g_free(info);
         return FALSE;
     }
@@ -2358,6 +2360,8 @@ bw_real_open_mbnode_idle_cb(BalsaWindowRealOpenMbnodeInfo * info)
     g_free(info->message);
 
     if (balsa_find_notebook_page_num(mailbox) >= 0) {
+        g_object_unref(g_object_ref_sink(index));
+        g_object_unref(mbnode);
         g_free(info);
         return FALSE;
     }


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